summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/include
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-04-20 00:42:07 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-04-20 00:42:07 +0000
commitb5396dca6504168d952b238075ba34f507a94e0b (patch)
tree39015d7d9f61a69ff36284c190932f40b1bc8834 /sys/arch/alpha/include
parent7720807a1d9f91f5c0f47d6b1be219d913aef6ac (diff)
Add a BUS_DMA_ZERO flag for bus_dmamem_alloc() to return zeroed memory.
Saves every damned driver calling bzero(), and continues the M_ZERO, PR_ZERO symmetry.
Diffstat (limited to 'sys/arch/alpha/include')
-rw-r--r--sys/arch/alpha/include/bus.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/sys/arch/alpha/include/bus.h b/sys/arch/alpha/include/bus.h
index 64d22ea286d..5b9f4431b90 100644
--- a/sys/arch/alpha/include/bus.h
+++ b/sys/arch/alpha/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.25 2009/02/01 14:33:58 miod Exp $ */
+/* $OpenBSD: bus.h,v 1.26 2009/04/20 00:42:05 oga Exp $ */
/* $NetBSD: bus.h,v 1.10 1996/12/02 22:19:32 cgd Exp $ */
/*
@@ -428,17 +428,18 @@ struct alpha_bus_space {
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x000 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x001 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x002 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x004 /* hint: map memory DMA coherent */
-#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x020
-#define BUS_DMA_BUS3 0x040
-#define BUS_DMA_24BIT 0x080 /* isadma map */
-#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_WAITOK 0x0000 /* safe to sleep (pseudo-flag) */
+#define BUS_DMA_NOWAIT 0x0001 /* not safe to sleep */
+#define BUS_DMA_ALLOCNOW 0x0002 /* perform resource allocation now */
+#define BUS_DMA_COHERENT 0x0004 /* hint: map memory DMA coherent */
+#define BUS_DMA_BUS1 0x0010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x0020
+#define BUS_DMA_BUS3 0x0040
+#define BUS_DMA_24BIT 0x0080 /* isadma map */
+#define BUS_DMA_STREAMING 0x0100 /* hint: sequential, unidirectional */
+#define BUS_DMA_READ 0x0200 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x0400 /* mapping is memory -> device only */
+#define BUS_DMA_ZERO 0x1000 /* zero memory in dmamem_alloc */
/*
* Private flags stored in the DMA map.