Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint...
details: https://anonhg.NetBSD.org/src/rev/735373bc8602
branches: trunk
changeset: 512933:735373bc8602
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Jul 19 15:32:10 2001 +0000
description:
Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
diffstat:
sys/arch/algor/include/bus.h | 22 ++++++++++++----------
sys/arch/alpha/include/bus.h | 22 ++++++++++++----------
sys/arch/arc/include/bus.h | 22 ++++++++++++----------
sys/arch/arm/include/bus.h | 22 ++++++++++++----------
sys/arch/atari/include/bus.h | 22 ++++++++++++----------
sys/arch/cobalt/include/bus.h | 22 ++++++++++++----------
sys/arch/dreamcast/include/bus.h | 22 ++++++++++++----------
sys/arch/hpcmips/include/bus.h | 22 ++++++++++++----------
sys/arch/hpcsh/include/bus.h | 22 ++++++++++++----------
sys/arch/i386/include/bus.h | 22 ++++++++++++----------
sys/arch/macppc/include/bus.h | 22 ++++++++++++----------
sys/arch/mipsco/include/bus.h | 22 ++++++++++++----------
sys/arch/mvme68k/include/bus_dma.h | 22 ++++++++++++----------
sys/arch/newsmips/include/bus.h | 22 ++++++++++++----------
sys/arch/next68k/include/bus_dma.h | 22 ++++++++++++----------
sys/arch/pmax/include/bus.h | 22 ++++++++++++----------
sys/arch/powerpc/include/bus.h | 22 ++++++++++++----------
sys/arch/sgimips/include/bus.h | 22 ++++++++++++----------
sys/arch/sh3/include/bus.h | 20 +++++++++++---------
sys/arch/sparc/include/bus.h | 22 ++++++++++++----------
sys/arch/sparc64/include/bus.h | 4 +++-
sys/arch/sun68k/include/bus.h | 20 +++++++++++---------
sys/arch/vax/include/bus.h | 22 ++++++++++++----------
sys/arch/walnut/include/bus.h | 22 ++++++++++++----------
sys/arch/x68k/include/bus.h | 22 ++++++++++++----------
sys/arch/x86_64/include/bus.h | 22 ++++++++++++----------
26 files changed, 301 insertions(+), 249 deletions(-)
diffs (truncated from 914 to 300 lines):
diff -r 52f3016b476d -r 735373bc8602 sys/arch/algor/include/bus.h
--- a/sys/arch/algor/include/bus.h Thu Jul 19 15:32:06 2001 +0000
+++ b/sys/arch/algor/include/bus.h Thu Jul 19 15:32:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.2 2001/05/31 02:20:55 enami Exp $ */
+/* $NetBSD: bus.h,v 1.3 2001/07/19 15:32:10 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -487,15 +487,17 @@
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* hint: map memory DMA coherent */
-#define BUS_DMA_STREAMING 0x08 /* hint: sequential, unidirectional */
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
+#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_STREAMING 0x008 /* hint: sequential, unidirectional */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
/*
* Private flags stored in the DMA map.
diff -r 52f3016b476d -r 735373bc8602 sys/arch/alpha/include/bus.h
--- a/sys/arch/alpha/include/bus.h Thu Jul 19 15:32:06 2001 +0000
+++ b/sys/arch/alpha/include/bus.h Thu Jul 19 15:32:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.44 2001/07/19 04:27:37 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.45 2001/07/19 15:32:11 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -491,15 +491,17 @@
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* hint: map memory DMA coherent */
-#define BUS_DMA_STREAMING 0x08 /* hint: sequential, unidirectional */
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
+#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_STREAMING 0x008 /* hint: sequential, unidirectional */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
/*
* Private flags stored in the DMA map.
diff -r 52f3016b476d -r 735373bc8602 sys/arch/arc/include/bus.h
--- a/sys/arch/arc/include/bus.h Thu Jul 19 15:32:06 2001 +0000
+++ b/sys/arch/arc/include/bus.h Thu Jul 19 15:32:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.10 2001/03/07 22:42:17 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.11 2001/07/19 15:32:11 thorpej Exp $ */
/* NetBSD: bus.h,v 1.27 2000/03/15 16:44:50 drochner Exp */
/* $OpenBSD: bus.h,v 1.15 1999/08/11 23:15:21 niklas Exp $ */
@@ -670,15 +670,17 @@
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* hint: map memory DMA coherent */
-#define BUS_DMA_STREAMING 0x08 /* hint: sequential, unidirectional */
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
+#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_STREAMING 0x008 /* hint: sequential, unidirectional */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
#define ARC_DMAMAP_COHERENT 0x100 /* no cache flush necessary on sync */
diff -r 52f3016b476d -r 735373bc8602 sys/arch/arm/include/bus.h
--- a/sys/arch/arm/include/bus.h Thu Jul 19 15:32:06 2001 +0000
+++ b/sys/arch/arm/include/bus.h Thu Jul 19 15:32:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.1 2001/06/18 21:37:33 bjh21 Exp $ */
+/* $NetBSD: bus.h,v 1.2 2001/07/19 15:32:12 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -609,15 +609,17 @@
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* hint: map memory DMA coherent */
-#define BUS_DMA_STREAMING 0x08 /* hint: sequential, unidirectional */
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
+#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_STREAMING 0x008 /* hint: sequential, unidirectional */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
/* Forwards needed by prototypes below. */
struct mbuf;
diff -r 52f3016b476d -r 735373bc8602 sys/arch/atari/include/bus.h
--- a/sys/arch/atari/include/bus.h Thu Jul 19 15:32:06 2001 +0000
+++ b/sys/arch/atari/include/bus.h Thu Jul 19 15:32:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.26 2001/05/28 07:16:11 leo Exp $ */
+/* $NetBSD: bus.h,v 1.27 2001/07/19 15:32:12 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -536,15 +536,17 @@
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* hint: map memory DMA coherent */
-#define BUS_DMA_STREAMING 0x08 /* hint: sequential, unidirectional */
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
+#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_STREAMING 0x008 /* hint: sequential, unidirectional */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
/* Forwards needed by prototypes below. */
struct mbuf;
diff -r 52f3016b476d -r 735373bc8602 sys/arch/cobalt/include/bus.h
--- a/sys/arch/cobalt/include/bus.h Thu Jul 19 15:32:06 2001 +0000
+++ b/sys/arch/cobalt/include/bus.h Thu Jul 19 15:32:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.5 2001/03/07 22:42:17 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.6 2001/07/19 15:32:12 thorpej Exp $ */
/*
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -475,15 +475,17 @@
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* hint: map memory DMA coherent */
-#define BUS_DMA_STREAMING 0x08 /* hint: sequential, unidirectional */
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
+#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_STREAMING 0x008 /* hint: sequential, unidirectional */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
#define COBALT_DMAMAP_COHERENT 0x100 /* no cache flush necessary on sync */
diff -r 52f3016b476d -r 735373bc8602 sys/arch/dreamcast/include/bus.h
--- a/sys/arch/dreamcast/include/bus.h Thu Jul 19 15:32:06 2001 +0000
+++ b/sys/arch/dreamcast/include/bus.h Thu Jul 19 15:32:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.4 2001/03/07 22:42:18 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.5 2001/07/19 15:32:13 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -453,15 +453,17 @@
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* map memory to not require sync */
-#define BUS_DMA_STREAMING 0x08 /* hint: sequential, unidirectional */
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
+#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 /* map memory to not require sync */
+#define BUS_DMA_STREAMING 0x008 /* hint: sequential, unidirectional */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
/* Forwards needed by prototypes below. */
struct mbuf;
diff -r 52f3016b476d -r 735373bc8602 sys/arch/hpcmips/include/bus.h
--- a/sys/arch/hpcmips/include/bus.h Thu Jul 19 15:32:06 2001 +0000
+++ b/sys/arch/hpcmips/include/bus.h Thu Jul 19 15:32:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.10 2001/05/31 02:30:04 enami Exp $ */
+/* $NetBSD: bus.h,v 1.11 2001/07/19 15:32:13 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -548,15 +548,17 @@
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* hint: map memory DMA coherent */
-#define BUS_DMA_STREAMING 0x08 /* hint: sequential, unidirectional */
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
+#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_STREAMING 0x008 /* hint: sequential, unidirectional */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
#define HPCMIPS_DMAMAP_COHERENT 0x100 /* no cache flush necessary on sync */
diff -r 52f3016b476d -r 735373bc8602 sys/arch/hpcsh/include/bus.h
--- a/sys/arch/hpcsh/include/bus.h Thu Jul 19 15:32:06 2001 +0000
+++ b/sys/arch/hpcsh/include/bus.h Thu Jul 19 15:32:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.4 2001/03/15 17:30:57 uch Exp $ */
+/* $NetBSD: bus.h,v 1.5 2001/07/19 15:32:13 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -593,15 +593,17 @@
/*
* Flags used in various bus DMA methods.
Home |
Main Index |
Thread Index |
Old Index