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 Convert the DEBUG code in pmap_grow_map t...



details:   https://anonhg.NetBSD.org/src/rev/b449fc5c1b2d
branches:  trunk
changeset: 744773:b449fc5c1b2d
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Feb 12 17:36:41 2020 +0000

description:
Convert the DEBUG code in pmap_grow_map to DIAGNOSTIC

diffstat:

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

diffs (42 lines):

diff -r 56ea0f465e20 -r b449fc5c1b2d sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Wed Feb 12 17:34:18 2020 +0000
+++ b/sys/arch/arm/arm32/pmap.c Wed Feb 12 17:36:41 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.391 2020/02/12 17:34:18 skrll Exp $ */
+/*     $NetBSD: pmap.c,v 1.392 2020/02/12 17:36:41 skrll Exp $ */
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -198,7 +198,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.391 2020/02/12 17:34:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.392 2020/02/12 17:36:41 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -5842,14 +5842,15 @@
                *pap = pa;
 
        PMAPCOUNT(pt_mappings);
-#ifdef DEBUG
-       struct l2_bucket * const l2b = pmap_get_l2_bucket(pmap_kernel(), va);
-       KDASSERT(l2b != NULL);
-
-       pt_entry_t * const ptep = &l2b->l2b_kva[l2pte_index(va)];
-       const pt_entry_t opte = *ptep;
-       KDASSERT((opte & L2_S_CACHE_MASK) == pte_l2_s_cache_mode_pt);
-#endif
+
+       struct l2_bucket * const l2b __diagused =
+           pmap_get_l2_bucket(pmap_kernel(), va);
+       KASSERT(l2b != NULL);
+
+       pt_entry_t * const ptep __diagused = &l2b->l2b_kva[l2pte_index(va)];
+       const pt_entry_t opte __diagused = *ptep;
+       KASSERT((opte & L2_S_CACHE_MASK) == pte_l2_s_cache_mode_pt);
+
        memset((void *)va, 0, PAGE_SIZE);
        return 0;
 }



Home | Main Index | Thread Index | Old Index