summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/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/hppa/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/hppa/include')
-rw-r--r--sys/arch/hppa/include/bus.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/sys/arch/hppa/include/bus.h b/sys/arch/hppa/include/bus.h
index 68810683dbd..61f29bef8f8 100644
--- a/sys/arch/hppa/include/bus.h
+++ b/sys/arch/hppa/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.25 2007/05/23 18:07:19 kettenis Exp $ */
+/* $OpenBSD: bus.h,v 1.26 2009/04/20 00:42:06 oga Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -291,18 +291,19 @@ extern const struct hppa_bus_space_tag hppa_bustag;
#define bus_space_vaddr(t,h) \
((t)->hbt_vaddr((t)->hbt_cookie, (h)))
-#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_DMAMEM_NOSYNC 0x010
-#define BUS_DMA_BUS1 0x020 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x040
-#define BUS_DMA_BUS3 0x080
-#define BUS_DMA_BUS4 0x100
-#define BUS_DMA_STREAMING 0x200 /* hint: sequential, unidirectional */
-#define BUS_DMA_READ 0x400 /* mapping is device -> memory only */
-#define BUS_DMA_WRITE 0x800 /* 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_DMAMEM_NOSYNC 0x0010
+#define BUS_DMA_BUS1 0x0020 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x0040
+#define BUS_DMA_BUS3 0x0080
+#define BUS_DMA_BUS4 0x0100
+#define BUS_DMA_STREAMING 0x0200 /* hint: sequential, unidirectional */
+#define BUS_DMA_READ 0x0400 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x0800 /* mapping is memory -> device only */
+#define BUS_DMA_ZERO 0x1000 /* zero memory in dmamem_alloc */
/* Forwards needed by prototypes below. */
struct mbuf;