diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-04-14 16:01:05 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-04-14 16:01:05 +0000 |
commit | 736b9535289dd9e3a0ffaafbb736c868a7f377d6 (patch) | |
tree | 608c5bb2fc645051c56618391202edc1c0f9e6e8 /sys/arch/vax | |
parent | 1b91dd8d89d56b40421b288402b14602db6d9a0f (diff) |
Convert the waitok field of uvm_pglistalloc to "flags", more will be added soon.
For the possibility of sleeping, the first two flags are UVM_PLA_WAITOK
and UVM_PLA_NOWAIT. It is an error not to show intention, so assert that
one of the two is provided. Switch over every caller in the tree to
using the appropriate flag.
ok art@, ariane@
Diffstat (limited to 'sys/arch/vax')
-rw-r--r-- | sys/arch/vax/vax/bus_dma.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/vax/vax/bus_dma.c b/sys/arch/vax/vax/bus_dma.c index 46b5e7e5793..826784b91be 100644 --- a/sys/arch/vax/vax/bus_dma.c +++ b/sys/arch/vax/vax/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.21 2009/03/07 15:34:34 miod Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.22 2009/04/14 16:01:04 oga Exp $ */ /* $NetBSD: bus_dma.c,v 1.5 1999/11/13 00:32:20 thorpej Exp $ */ /*- @@ -682,7 +682,7 @@ _bus_dmamem_alloc_range(t, size, alignment, boundary, segs, nsegs, rsegs, paddr_t curaddr, lastaddr; struct vm_page *m; struct pglist mlist; - int curseg, error; + int curseg, error, plaflag; #ifdef DEBUG_DMA printf("alloc_range: t=%p size=%lx align=%lx boundary=%lx segs=%p nsegs=%x rsegs=%p flags=%x lo=%lx hi=%lx\n", @@ -695,9 +695,11 @@ _bus_dmamem_alloc_range(t, size, alignment, boundary, segs, nsegs, rsegs, /* * Allocate pages from the VM system. */ + plaflag = flags & BUS_DMA_NOWAIT ? UVM_PLA_NOWAIT : UVM_PLA_WAITOK; + TAILQ_INIT(&mlist); error = uvm_pglistalloc(size, low, high, alignment, boundary, - &mlist, nsegs, (flags & BUS_DMA_NOWAIT) == 0); + &mlist, nsegs, plaflag); if (error) return (error); |