diff options
Diffstat (limited to 'sys/arch/arm')
-rw-r--r-- | sys/arch/arm/arm/bus_dma.c | 10 | ||||
-rw-r--r-- | sys/arch/arm/arm/pmap.c | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/arch/arm/arm/bus_dma.c b/sys/arch/arm/arm/bus_dma.c index cb3196c96ec..a6d20e3b353 100644 --- a/sys/arch/arm/arm/bus_dma.c +++ b/sys/arch/arm/arm/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.13 2009/03/07 15:34:34 miod Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.14 2009/04/14 16:01:04 oga Exp $ */ /* $NetBSD: bus_dma.c,v 1.38 2003/10/30 08:44:13 scw Exp $ */ /*- @@ -961,7 +961,7 @@ _bus_dmamem_alloc_range(bus_dma_tag_t t, bus_size_t size, bus_size_t alignment, 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", @@ -971,12 +971,14 @@ _bus_dmamem_alloc_range(bus_dma_tag_t t, bus_size_t size, bus_size_t alignment, /* Always round the size. */ size = round_page(size); - TAILQ_INIT(&mlist); /* * 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); diff --git a/sys/arch/arm/arm/pmap.c b/sys/arch/arm/arm/pmap.c index b47279ea4ec..cad1f22043d 100644 --- a/sys/arch/arm/arm/pmap.c +++ b/sys/arch/arm/arm/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.20 2009/03/23 13:25:11 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.21 2009/04/14 16:01:04 oga Exp $ */ /* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */ /* @@ -4140,7 +4140,7 @@ pmap_postinit(void) TAILQ_INIT(&plist); error = uvm_pglistalloc(L1_TABLE_SIZE, physical_start, - physical_end, L1_TABLE_SIZE, 0, &plist, 1, M_WAITOK); + physical_end, L1_TABLE_SIZE, 0, &plist, 1, UVM_PLA_WAITOK); if (error) panic("Cannot allocate L1 physical pages"); |