diff options
Diffstat (limited to 'sys/arch/vax')
-rw-r--r-- | sys/arch/vax/include/bus.h | 3 | ||||
-rw-r--r-- | sys/arch/vax/vax/bus_dma.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/vax/include/bus.h b/sys/arch/vax/include/bus.h index 5e054f7e537..51bdffb1e17 100644 --- a/sys/arch/vax/include/bus.h +++ b/sys/arch/vax/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.11 2008/08/15 22:39:59 miod Exp $ */ +/* $OpenBSD: bus.h,v 1.12 2009/04/20 00:42:06 oga Exp $ */ /* $NetBSD: bus.h,v 1.14 2000/06/26 04:56:13 simonb Exp $ */ /*- @@ -771,6 +771,7 @@ vax_mem_copy_region_4(t, h1, o1, h2, o2, c) #define BUS_DMA_STREAMING 0x100 /* hint: sequential, unidirectional */ #define BUS_DMA_READ 0x200 /* mapping is device -> memory only */ #define BUS_DMA_WRITE 0x400 /* mapping is memory -> device only */ +#define BUS_DMA_ZERO 0x800 /* zero memory in dmamem_alloc */ #define VAX_BUS_DMA_SPILLPAGE BUS_DMA_BUS1 /* VS4000 kludge */ /* diff --git a/sys/arch/vax/vax/bus_dma.c b/sys/arch/vax/vax/bus_dma.c index 826784b91be..87701767d9d 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.22 2009/04/14 16:01:04 oga Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.23 2009/04/20 00:42:06 oga Exp $ */ /* $NetBSD: bus_dma.c,v 1.5 1999/11/13 00:32:20 thorpej Exp $ */ /*- @@ -696,6 +696,8 @@ _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; + if (flags & BUS_DMA_ZERO) + plaflag |= UVM_PLA_ZERO; TAILQ_INIT(&mlist); error = uvm_pglistalloc(size, low, high, alignment, boundary, |