summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-01-15 19:44:51 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-01-15 19:44:51 +0000
commit301314a981bd46fd1503bb61af86bcf97082f152 (patch)
tree72a1f8e862b48ed56cb8a27fad074eca9e5d5b00 /sys/arch
parent1343a220747703fde93f38f9983919cf68d2a9ff (diff)
Revert r1.15 and flush pages (if cached) in pmap_remove_pv on every invocation,
instead of when removing the last page. It looked correct, but is defeated by ``index'' cache invalidates.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mips64/mips64/pmap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/mips64/mips64/pmap.c b/sys/arch/mips64/mips64/pmap.c
index bfad0f39079..7f007da9b42 100644
--- a/sys/arch/mips64/mips64/pmap.c
+++ b/sys/arch/mips64/mips64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.30 2007/10/18 04:32:08 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.31 2008/01/15 19:44:50 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -1324,6 +1324,8 @@ pmap_remove_pv(pmap_t pmap, vaddr_t va, paddr_t pa)
* first root item can't be freed. Else walk the list.
*/
if (pmap == pv->pv_pmap && va == pv->pv_va) {
+ if (pg->pg_flags & PV_CACHED)
+ Mips_SyncDCachePage(va);
npv = pv->pv_next;
if (npv) {
*pv = *npv;
@@ -1333,7 +1335,6 @@ pmap_remove_pv(pmap_t pmap, vaddr_t va, paddr_t pa)
atomic_clearbits_int(&pg->pg_flags,
(PG_PMAP0 | PG_PMAP1 | PG_PMAP2 | PG_PMAP3) &
~PV_PRESERVE);
- Mips_SyncDCachePage(va);
}
stat_count(remove_stats.pvfirst);
} else {
@@ -1343,6 +1344,8 @@ pmap_remove_pv(pmap_t pmap, vaddr_t va, paddr_t pa)
break;
}
if (npv != NULL) {
+ if (pg->pg_flags & PV_CACHED)
+ Mips_SyncDCachePage(va);
pv->pv_next = npv->pv_next;
pmap_pv_free(npv);
} else {