Use uvm_km_valloc_prefer_wait() instead of uvm_km_valloc_wait() in vmapbuf().
authormiod <miod@openbsd.org>
Mon, 14 Jul 2008 14:00:00 +0000 (14:00 +0000)
committermiod <miod@openbsd.org>
Mon, 14 Jul 2008 14:00:00 +0000 (14:00 +0000)
ok art@

sys/arch/sh/sh/vm_machdep.c
sys/arch/sparc64/sparc64/vm_machdep.c

index a5b332d..52c80f2 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vm_machdep.c,v 1.9 2007/05/27 20:59:26 miod Exp $     */
+/*     $OpenBSD: vm_machdep.c,v 1.10 2008/07/14 14:00:00 miod Exp $    */
 /*     $NetBSD: vm_machdep.c,v 1.53 2006/08/31 16:49:21 matt Exp $     */
 
 /*
@@ -322,7 +322,7 @@ vmapbuf(struct buf *bp, vsize_t len)
        faddr = trunc_page((vaddr_t)bp->b_data);
        off = (vaddr_t)bp->b_data - faddr;
        len = round_page(off + len);
-       taddr = uvm_km_valloc_wait(phys_map, len);
+       taddr = uvm_km_valloc_prefer_wait(phys_map, len, faddr);
        bp->b_data = (caddr_t)(taddr + off);
        /*
         * The region is locked, so we expect that pmap_pte() will return
index 4e940cd..bac9a8a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vm_machdep.c,v 1.24 2008/03/15 22:05:51 kettenis Exp $        */
+/*     $OpenBSD: vm_machdep.c,v 1.25 2008/07/14 14:00:01 miod Exp $    */
 /*     $NetBSD: vm_machdep.c,v 1.38 2001/06/30 00:02:20 eeh Exp $ */
 
 /*
@@ -96,7 +96,7 @@ vmapbuf(bp, len)
        uva = trunc_page((vaddr_t)bp->b_data);
        off = (vaddr_t)bp->b_data - uva;
        len = round_page(off + len);
-       kva = uvm_km_valloc_wait(kernel_map, len);
+       kva = uvm_km_valloc_prefer_wait(kernel_map, len, uva);
        bp->b_data = (caddr_t)(kva + off);
 
        /*