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 Enhance the DIAGNOSTICs around pmap_grow_map
details: https://anonhg.NetBSD.org/src/rev/1f8170718eb1
branches: trunk
changeset: 745829:1f8170718eb1
user: skrll <skrll%NetBSD.org@localhost>
date: Fri Mar 13 16:25:19 2020 +0000
description:
Enhance the DIAGNOSTICs around pmap_grow_map
diffstat:
sys/arch/arm/arm32/pmap.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r 97be6bba3ad0 -r 1f8170718eb1 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Fri Mar 13 16:16:29 2020 +0000
+++ b/sys/arch/arm/arm32/pmap.c Fri Mar 13 16:25:19 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.397 2020/03/13 16:16:29 skrll Exp $ */
+/* $NetBSD: pmap.c,v 1.398 2020/03/13 16:25: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.397 2020/03/13 16:16:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.398 2020/03/13 16:25:19 skrll Exp $");
#include <sys/atomic.h>
#include <sys/param.h>
@@ -5837,15 +5837,17 @@
PMAPCOUNT(pt_mappings);
- struct l2_bucket * const l2b __diagused =
- pmap_get_l2_bucket(pmap_kernel(), va);
+ const pmap_t kpm __diagused = pmap_kernel();
+ struct l2_bucket * const l2b __diagused = pmap_get_l2_bucket(kpm, 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);
+ const pt_entry_t pte __diagused = *ptep;
+ KASSERT(l2pte_valid_p(pte));
+ KASSERT((pte & 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