Module Name:    src
Committed By:   skrll
Date:           Wed Feb 12 16:08:19 UTC 2020

Modified Files:
        src/sys/arch/arm/arm32: pmap.c

Log Message:
Minor changes to make pmap_grow_l2_bucket look more like
pmap_alloc_l2_bucket.  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.388 -r1.389 src/sys/arch/arm/arm32/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.388 src/sys/arch/arm/arm32/pmap.c:1.389
--- src/sys/arch/arm/arm32/pmap.c:1.388	Wed Feb  5 07:37:35 2020
+++ src/sys/arch/arm/arm32/pmap.c	Wed Feb 12 16:08:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.388 2020/02/05 07:37:35 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.389 2020/02/12 16:08:19 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -198,7 +198,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.388 2020/02/05 07:37:35 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.389 2020/02/12 16:08:19 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -5861,13 +5861,10 @@ pmap_grow_map(vaddr_t va, paddr_t *pap)
 static inline struct l2_bucket *
 pmap_grow_l2_bucket(pmap_t pm, vaddr_t va)
 {
+	const size_t l1slot = l1pte_index(va);
 	struct l2_dtable *l2;
-	struct l2_bucket *l2b;
-	u_short l1slot;
 	vaddr_t nva;
 
-	l1slot = l1pte_index(va);
-
 	if ((l2 = pm->pm_l2[L2_IDX(l1slot)]) == NULL) {
 		/*
 		 * No mapping at this address, as there is
@@ -5903,7 +5900,7 @@ pmap_grow_l2_bucket(pmap_t pm, vaddr_t v
 		pm->pm_l2[L2_IDX(l1slot)] = l2;
 	}
 
-	l2b = &l2->l2_bucket[L2_BUCKET(l1slot)];
+	struct l2_bucket * const l2b = &l2->l2_bucket[L2_BUCKET(l1slot)];
 
 	/*
 	 * Fetch pointer to the L2 page table associated with the address.

Reply via email to