summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2011-11-09 10:15:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2011-11-09 10:15:50 +0000
commitef8c4160e2847d43a9c70b45a31ab7a689a5df93 (patch)
tree4f446cf8b914f1048c24d04390888233d97d4d9b /sys
parent830140ea20df6405303df5157ee9d493f5664e43 (diff)
In pmap_remove(), don't forget to do tlb flushes even in the !pmap_cachevivt
case. ok drahn@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm/arm/pmap.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/arch/arm/arm/pmap.c b/sys/arch/arm/arm/pmap.c
index dee73e692f8..a04cad57dd9 100644
--- a/sys/arch/arm/arm/pmap.c
+++ b/sys/arch/arm/arm/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.34 2011/11/06 23:21:04 drahn Exp $ */
+/* $OpenBSD: pmap.c,v 1.35 2011/11/09 10:15:49 miod Exp $ */
/* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */
/*
@@ -2385,17 +2385,19 @@ pmap_remove(pmap_t pm, vaddr_t sva, vaddr_t eva)
if (pmap_cachevivt == 0 &&
curproc->p_vmspace->vm_map.pmap != pm) {
pmap_idcache_wbinv_all(pm);
- } else
+ }
if (pm->pm_cstate.cs_all != 0) {
vaddr_t clva = cleanlist[cnt].va & ~1;
if (cleanlist[cnt].va & 1) {
- pmap_idcache_wbinv_range(pm,
- clva, PAGE_SIZE);
+ if (pmap_cachevivt)
+ pmap_idcache_wbinv_range(pm,
+ clva, PAGE_SIZE);
pmap_tlb_flushID_SE(pm, clva);
} else {
- pmap_dcache_wb_range(pm,
- clva, PAGE_SIZE, TRUE,
- FALSE);
+ if (pmap_cachevivt)
+ pmap_dcache_wb_range(pm,
+ clva, PAGE_SIZE,
+ TRUE, FALSE);
pmap_tlb_flushD_SE(pm, clva);
}
}