summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-06-20 17:29:37 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-06-20 17:29:37 +0000
commiteb665c5ca5fbea0bffcae85a3186d4fa212e3950 (patch)
tree640d10bab9da04b14672894700fa4345b3ba5213 /sys/arch/sparc64
parent98769c6ed17b76aa17508f5c952d51e63c956c96 (diff)
In vunmapbuf(), explicitely remove mappings before invoking uvm_km_free().
Even if the latter would end up removing the mappings by itself, it would do so using pmap_remove() because phys_map is not intrsafe; but some platforms use pmap_kenter_pa() in vmapbuf(). By removing the mappings ourselves, we can ensure the remove function used matches the enter function which has been used. Discussed and theoretical ok art@
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/vm_machdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/sparc64/sparc64/vm_machdep.c b/sys/arch/sparc64/sparc64/vm_machdep.c
index f60192b2be8..5d46c9eb715 100644
--- a/sys/arch/sparc64/sparc64/vm_machdep.c
+++ b/sys/arch/sparc64/sparc64/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.14 2007/05/27 20:59:26 miod Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.15 2007/06/20 17:29:36 miod Exp $ */
/* $NetBSD: vm_machdep.c,v 1.38 2001/06/30 00:02:20 eeh Exp $ */
/*
@@ -142,7 +142,8 @@ vunmapbuf(bp, len)
off = (vaddr_t)bp->b_data - kva;
len = round_page(off + len);
- /* This will call pmap_remove() for us. */
+ pmap_remove(pmap_kernel(), kva, kva + len);
+ pmap_update(pmap_kernel());
uvm_km_free_wakeup(kernel_map, kva, len);
bp->b_data = bp->b_saveaddr;
bp->b_saveaddr = NULL;