Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/arm32 Minor changes to make pmap_grow_l2_bucket...



details:   https://anonhg.NetBSD.org/src/rev/bd079f8a583a
branches:  trunk
changeset: 969235:bd079f8a583a
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Feb 12 16:08:19 2020 +0000

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

diffstat:

 sys/arch/arm/arm32/pmap.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (42 lines):

diff -r 341295c19547 -r bd079f8a583a sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Wed Feb 12 16:02:01 2020 +0000
+++ b/sys/arch/arm/arm32/pmap.c Wed Feb 12 16:08:19 2020 +0000
@@ -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 @@
 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 @@
                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.



Home | Main Index | Thread Index | Old Index