diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-06-20 17:29:37 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-06-20 17:29:37 +0000 |
commit | eb665c5ca5fbea0bffcae85a3186d4fa212e3950 (patch) | |
tree | 640d10bab9da04b14672894700fa4345b3ba5213 /sys/arch/hppa | |
parent | 98769c6ed17b76aa17508f5c952d51e63c956c96 (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/hppa')
-rw-r--r-- | sys/arch/hppa/hppa/vm_machdep.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c index 8403226ceeb..a4b8e0f5d5a 100644 --- a/sys/arch/hppa/hppa/vm_machdep.c +++ b/sys/arch/hppa/hppa/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.60 2007/06/05 17:15:21 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.61 2007/06/20 17:29:34 miod Exp $ */ /* * Copyright (c) 1999-2004 Michael Shalayeff @@ -257,6 +257,8 @@ vunmapbuf(bp, len) addr = trunc_page((vaddr_t)bp->b_data); off = (vaddr_t)bp->b_data - addr; len = round_page(off + len); + pmap_kremove(addr, len); + pmap_update(pmap_kernel()); uvm_km_free_wakeup(phys_map, addr, len); bp->b_data = bp->b_saveaddr; bp->b_saveaddr = NULL; |