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 Correct assertions for PMAP_CACHE_VIPT co...
details: https://anonhg.NetBSD.org/src/rev/147abbcb0ede
branches: trunk
changeset: 750427:147abbcb0ede
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Thu Dec 31 02:36:14 2009 +0000
description:
Correct assertions for PMAP_CACHE_VIPT code; if page coloring is disabled
(arm_cache_prefer_mask == 0), pvh_attrs has never PVF_COLORED, so don't assert
it. No functional changes.
diffstat:
sys/arch/arm/arm32/pmap.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (72 lines):
diff -r 6ae96ac2853d -r 147abbcb0ede sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Thu Dec 31 02:20:36 2009 +0000
+++ b/sys/arch/arm/arm32/pmap.c Thu Dec 31 02:36:14 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.206 2009/12/28 15:13:57 uebayasi Exp $ */
+/* $NetBSD: pmap.c,v 1.207 2009/12/31 02:36:14 uebayasi Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -211,7 +211,7 @@
#include <machine/param.h>
#include <arm/arm32/katelib.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.206 2009/12/28 15:13:57 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.207 2009/12/31 02:36:14 uebayasi Exp $");
#ifdef PMAP_DEBUG
@@ -1919,7 +1919,7 @@
KASSERT((pg->mdpage.pvh_attrs & PVF_DMOD) == 0 || (pg->mdpage.pvh_attrs & (PVF_DIRTY|PVF_NC)));
KASSERT((rw_mappings == 0) == !(pg->mdpage.pvh_attrs & PVF_WRITE));
} else if (!va) {
- KASSERT(pmap_is_page_colored_p(pg));
+ KASSERT(arm_cache_prefer_mask == 0 || pmap_is_page_colored_p(pg));
KASSERT(!(pg->mdpage.pvh_attrs & PVF_WRITE)
|| (pg->mdpage.pvh_attrs & PVF_DIRTY));
if (rw_mappings == 0) {
@@ -2434,7 +2434,7 @@
*/
if (pg->mdpage.pvh_attrs & PVF_NC)
return;
- KASSERT(pg->mdpage.pvh_attrs & PVF_COLORED);
+ KASSERT(arm_cache_prefer_mask == 0 || pg->mdpage.pvh_attrs & PVF_COLORED);
pmap_tlb_flushID_SE(pmap_kernel(), cdstp + va_offset);
/*
@@ -2593,7 +2593,7 @@
return;
}
#ifdef PMAP_CACHE_VIPT
- KASSERT(pmap_is_page_colored_p(pg));
+ KASSERT(arm_cache_prefer_mask == 0 || pmap_is_page_colored_p(pg));
#endif
/*
@@ -3273,7 +3273,7 @@
struct pv_entry *pv;
simple_lock(&pg->mdpage.pvh_slock);
- KASSERT(pg->mdpage.pvh_attrs & (PVF_COLORED|PVF_NC));
+ KASSERT(arm_cache_prefer_mask == 0 || pg->mdpage.pvh_attrs & (PVF_COLORED|PVF_NC));
KASSERT((pg->mdpage.pvh_attrs & PVF_KMPAGE) == 0);
pv = pmap_remove_pv(pg, pmap_kernel(), va);
@@ -3371,7 +3371,7 @@
KASSERT(pg->mdpage.kro_mappings == 0);
#ifdef PMAP_CACHE_VIPT
KASSERT(pv == NULL);
- KASSERT((va & PVF_COLORED) == 0);
+ KASSERT(arm_cache_prefer_mask == 0 || (va & PVF_COLORED) == 0);
KASSERT((pg->mdpage.pvh_attrs & PVF_NC) == 0);
/* if there is a color conflict, evict from cache. */
if (pmap_is_page_colored_p(pg)
@@ -4595,7 +4595,7 @@
#endif
#ifdef PMAP_CACHE_VIPT
- KASSERT(src_pg->mdpage.pvh_attrs & (PVF_COLORED|PVF_NC));
+ KASSERT(arm_cache_prefer_mask == 0 || src_pg->mdpage.pvh_attrs & (PVF_COLORED|PVF_NC));
#endif
KDASSERT((src & PGOFSET) == 0);
KDASSERT((dst & PGOFSET) == 0);
Home |
Main Index |
Thread Index |
Old Index