summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorkent <kent@NetBSD.org>2003-01-28 01:07:51 +0000
committerkent <kent@NetBSD.org>2003-01-28 01:07:51 +0000
commitcd7d9faeaf3854b5db236bed3fcada463d795d26 (patch)
tree88d17c406f3b25934dd0926548bfbfd7a621dbde /sys
parent2dcac9e4eb67baa3de2a0a7954f1b500e2762194 (diff)
Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/algor/include/bus.h3
-rw-r--r--sys/arch/alpha/include/bus.h3
-rw-r--r--sys/arch/arc/include/bus.h19
-rw-r--r--sys/arch/arm/include/bus.h3
-rw-r--r--sys/arch/atari/include/bus.h3
-rw-r--r--sys/arch/cobalt/include/bus.h3
-rw-r--r--sys/arch/dreamcast/include/bus.h3
-rw-r--r--sys/arch/hp700/include/bus.h3
-rw-r--r--sys/arch/hpcmips/include/bus.h3
-rw-r--r--sys/arch/hpcsh/include/bus.h3
-rw-r--r--sys/arch/i386/i386/bus_machdep.c26
-rw-r--r--sys/arch/i386/include/bus.h3
-rw-r--r--sys/arch/m68k/include/bus_dma.h3
-rw-r--r--sys/arch/macppc/include/bus.h19
-rw-r--r--sys/arch/mips/include/bus_dma.h3
-rw-r--r--sys/arch/mipsco/include/bus.h19
-rw-r--r--sys/arch/mvme68k/include/bus_dma.h3
-rw-r--r--sys/arch/newsmips/include/bus.h3
-rw-r--r--sys/arch/ofppc/include/bus.h3
-rw-r--r--sys/arch/playstation2/include/bus.h3
-rw-r--r--sys/arch/pmax/include/bus.h3
-rw-r--r--sys/arch/powerpc/include/bus.h3
-rw-r--r--sys/arch/sgimips/include/bus.h3
-rw-r--r--sys/arch/sh5/include/bus.h3
-rw-r--r--sys/arch/sparc/include/bus.h3
-rw-r--r--sys/arch/sparc64/include/bus.h3
-rw-r--r--sys/arch/sun68k/include/bus.h3
-rw-r--r--sys/arch/vax/include/bus.h3
-rw-r--r--sys/arch/x68k/include/bus.h3
-rw-r--r--sys/arch/x86_64/include/bus.h3
30 files changed, 106 insertions, 55 deletions
diff --git a/sys/arch/algor/include/bus.h b/sys/arch/algor/include/bus.h
index eb33224ba39..a35fd7f06cd 100644
--- a/sys/arch/algor/include/bus.h
+++ b/sys/arch/algor/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.6 2002/03/17 21:45:06 simonb Exp $ */
+/* $NetBSD: bus.h,v 1.7 2003/01/28 01:07:52 kent Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -507,6 +507,7 @@ do { \
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/*
* Private flags stored in the DMA map.
diff --git a/sys/arch/alpha/include/bus.h b/sys/arch/alpha/include/bus.h
index 225717db380..5f7d294a842 100644
--- a/sys/arch/alpha/include/bus.h
+++ b/sys/arch/alpha/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.47 2002/04/26 04:15:19 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.48 2003/01/28 01:07:52 kent Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -511,6 +511,7 @@ do { \
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/*
* Private flags stored in the DMA map.
diff --git a/sys/arch/arc/include/bus.h b/sys/arch/arc/include/bus.h
index f1bfb80e16b..677b5bfc552 100644
--- a/sys/arch/arc/include/bus.h
+++ b/sys/arch/arc/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.14 2002/03/17 21:45:06 simonb Exp $ */
+/* $NetBSD: bus.h,v 1.15 2003/01/28 01:07:53 kent 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 $ */
@@ -681,17 +681,18 @@ bus_space_copy_region(8,64)
/*
* 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_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_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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
#define ARC_DMAMAP_COHERENT 0x10000 /* no cache flush necessary on sync */
diff --git a/sys/arch/arm/include/bus.h b/sys/arch/arm/include/bus.h
index 81a886983a5..27096016b58 100644
--- a/sys/arch/arm/include/bus.h
+++ b/sys/arch/arm/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.8 2002/08/17 20:46:27 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.9 2003/01/28 01:07:53 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -633,6 +633,7 @@ bs_c_8_proto(f);
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/*
* Private flags stored in the DMA map.
diff --git a/sys/arch/atari/include/bus.h b/sys/arch/atari/include/bus.h
index 19740444302..72e8ebaa67f 100644
--- a/sys/arch/atari/include/bus.h
+++ b/sys/arch/atari/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.28 2002/01/07 07:17:17 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.29 2003/01/28 01:07:56 kent Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -557,6 +557,7 @@ paddr_t bus_space_mmap __P((bus_space_tag_t, bus_addr_t, off_t,
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* Forwards needed by prototypes below. */
struct mbuf;
diff --git a/sys/arch/cobalt/include/bus.h b/sys/arch/cobalt/include/bus.h
index d2ec4e0671a..539172ce0b2 100644
--- a/sys/arch/cobalt/include/bus.h
+++ b/sys/arch/cobalt/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.8 2002/03/17 21:45:07 simonb Exp $ */
+/* $NetBSD: bus.h,v 1.9 2003/01/28 01:07:56 kent Exp $ */
/*
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -486,6 +486,7 @@ __COBALT_copy_region(4)
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
#define COBALT_DMAMAP_COHERENT 0x10000 /* no cache flush necessary on sync */
diff --git a/sys/arch/dreamcast/include/bus.h b/sys/arch/dreamcast/include/bus.h
index 4e999fe075f..f2663b0910a 100644
--- a/sys/arch/dreamcast/include/bus.h
+++ b/sys/arch/dreamcast/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.6 2002/03/25 18:59:40 uch Exp $ */
+/* $NetBSD: bus.h,v 1.7 2003/01/28 01:07:57 kent Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -464,6 +464,7 @@ do { \
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* Forwards needed by prototypes below. */
struct mbuf;
diff --git a/sys/arch/hp700/include/bus.h b/sys/arch/hp700/include/bus.h
index c4f6d71a209..a3361d4e02c 100644
--- a/sys/arch/hp700/include/bus.h
+++ b/sys/arch/hp700/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.3 2002/08/25 20:20:01 fredette Exp $ */
+/* $NetBSD: bus.h,v 1.4 2003/01/28 01:07:58 kent Exp $ */
/* $OpenBSD: bus.h,v 1.13 2001/07/30 14:15:59 art Exp $ */
@@ -312,6 +312,7 @@ extern const struct hppa_bus_space_tag hppa_bustag;
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* For devices that have a 24-bit address space */
#define BUS_DMA_24BIT BUS_DMA_BUS1
diff --git a/sys/arch/hpcmips/include/bus.h b/sys/arch/hpcmips/include/bus.h
index 28ce8a39fd4..c72f8345993 100644
--- a/sys/arch/hpcmips/include/bus.h
+++ b/sys/arch/hpcmips/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.15 2002/04/14 07:59:59 takemura Exp $ */
+/* $NetBSD: bus.h,v 1.16 2003/01/28 01:07:58 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -931,6 +931,7 @@ struct bus_space_tag {
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/*
* Operations performed by bus_dmamap_sync().
diff --git a/sys/arch/hpcsh/include/bus.h b/sys/arch/hpcsh/include/bus.h
index 971518545ec..015a8b43a72 100644
--- a/sys/arch/hpcsh/include/bus.h
+++ b/sys/arch/hpcsh/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.7 2002/03/17 21:45:07 simonb Exp $ */
+/* $NetBSD: bus.h,v 1.8 2003/01/28 01:07:59 kent Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -604,6 +604,7 @@ void bus_space_destroy(bus_space_tag_t);
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/*
* Private flags stored in the DMA map.
diff --git a/sys/arch/i386/i386/bus_machdep.c b/sys/arch/i386/i386/bus_machdep.c
index 0b364cce5f9..310f3586d43 100644
--- a/sys/arch/i386/i386/bus_machdep.c
+++ b/sys/arch/i386/i386/bus_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_machdep.c,v 1.17 2002/10/01 12:56:48 fvdl Exp $ */
+/* $NetBSD: bus_machdep.c,v 1.18 2003/01/28 01:07:52 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_machdep.c,v 1.17 2002/10/01 12:56:48 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_machdep.c,v 1.18 2003/01/28 01:07:52 kent Exp $");
#include "opt_largepages.h"
@@ -796,6 +796,7 @@ _bus_dmamem_free(t, segs, nsegs)
/*
* Common function for mapping DMA-safe memory. May be called by
* bus-specific DMA memory map functions.
+ * This supports BUS_DMA_NOCACHE.
*/
int
_bus_dmamem_map(t, segs, nsegs, size, kvap, flags)
@@ -809,8 +810,15 @@ _bus_dmamem_map(t, segs, nsegs, size, kvap, flags)
vaddr_t va;
bus_addr_t addr;
int curseg;
+ int32_t cpumask;
+ int nocache;
+ int marked;
+ pt_entry_t *pte;
size = round_page(size);
+ cpumask = 0;
+ nocache = (flags & BUS_DMA_NOCACHE) != 0 && cpu_class != CPUCLASS_386;
+ marked = 0;
va = uvm_km_valloc(kernel_map, size);
@@ -828,8 +836,22 @@ _bus_dmamem_map(t, segs, nsegs, size, kvap, flags)
pmap_enter(pmap_kernel(), va, addr,
VM_PROT_READ | VM_PROT_WRITE,
PMAP_WIRED | VM_PROT_READ | VM_PROT_WRITE);
+ /*
+ * mark page as non-cacheable
+ */
+ if (nocache) {
+ pte = kvtopte(va);
+ if ((*pte & PG_N) == 0) {
+ *pte |= PG_N;
+ pmap_tlb_shootdown(pmap_kernel(), va,
+ *pte, &cpumask);
+ marked = 1;
+ }
+ }
}
}
+ if (marked)
+ pmap_tlb_shootnow(cpumask);
pmap_update(pmap_kernel());
return (0);
diff --git a/sys/arch/i386/include/bus.h b/sys/arch/i386/include/bus.h
index 12431b2090d..cf0ecb1c47d 100644
--- a/sys/arch/i386/include/bus.h
+++ b/sys/arch/i386/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.39 2002/10/01 12:57:03 fvdl Exp $ */
+/* $NetBSD: bus.h,v 1.40 2003/01/28 01:08:00 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -1027,6 +1027,7 @@ i386_memio_copy_region_4(bus_space_tag_t t,
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* Forwards needed by prototypes below. */
struct mbuf;
diff --git a/sys/arch/m68k/include/bus_dma.h b/sys/arch/m68k/include/bus_dma.h
index 79f3d4053a6..cabbd0b0545 100644
--- a/sys/arch/m68k/include/bus_dma.h
+++ b/sys/arch/m68k/include/bus_dma.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.h,v 1.1 2002/04/10 04:36:20 briggs Exp $ */
+/* $NetBSD: bus_dma.h,v 1.2 2003/01/28 01:08:01 kent Exp $ */
/*
* This file was extracted from from alpha/include/bus.h
@@ -93,6 +93,7 @@
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* Forwards needed by prototypes below. */
struct mbuf;
diff --git a/sys/arch/macppc/include/bus.h b/sys/arch/macppc/include/bus.h
index 23b1def245f..536f8a8ec32 100644
--- a/sys/arch/macppc/include/bus.h
+++ b/sys/arch/macppc/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.14 2001/07/19 15:32:14 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.15 2003/01/28 01:08:01 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -751,17 +751,18 @@ bus_space_set_region_stream_4(tag, bsh, offset, val, count)
/*
* 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_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_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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* Forwards needed by prototypes below. */
struct mbuf;
diff --git a/sys/arch/mips/include/bus_dma.h b/sys/arch/mips/include/bus_dma.h
index 015b1237045..b9c2bb7b256 100644
--- a/sys/arch/mips/include/bus_dma.h
+++ b/sys/arch/mips/include/bus_dma.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.h,v 1.2 2002/03/18 01:01:54 simonb Exp $ */
+/* $NetBSD: bus_dma.h,v 1.3 2003/01/28 01:08:02 kent Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -88,6 +88,7 @@
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/*
* Private flags stored in the DMA map.
diff --git a/sys/arch/mipsco/include/bus.h b/sys/arch/mipsco/include/bus.h
index 9484426d12b..644556a69f2 100644
--- a/sys/arch/mipsco/include/bus.h
+++ b/sys/arch/mipsco/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.9 2002/03/17 21:45:08 simonb Exp $ */
+/* $NetBSD: bus.h,v 1.10 2003/01/28 01:08:02 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -773,17 +773,18 @@ __bus_space_set_region(8, 64) /* bus_space_set_region_stream_8 */
/*
* 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_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_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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
#define MIPSCO_DMAMAP_COHERENT 0x10000 /* no cache flush necessary on sync */
diff --git a/sys/arch/mvme68k/include/bus_dma.h b/sys/arch/mvme68k/include/bus_dma.h
index 3f17157693b..f7fef59be93 100644
--- a/sys/arch/mvme68k/include/bus_dma.h
+++ b/sys/arch/mvme68k/include/bus_dma.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.h,v 1.10 2002/02/12 20:38:35 scw Exp $ */
+/* $NetBSD: bus_dma.h,v 1.11 2003/01/28 01:08:03 kent Exp $ */
/*
* This file was extracted from from next68k/include/bus.h
@@ -91,6 +91,7 @@
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/*
* Flags to constrain the physical memory allocated for DMA
diff --git a/sys/arch/newsmips/include/bus.h b/sys/arch/newsmips/include/bus.h
index 7feab070532..de9b5bd3886 100644
--- a/sys/arch/newsmips/include/bus.h
+++ b/sys/arch/newsmips/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.6 2002/03/17 21:45:08 simonb Exp $ */
+/* $NetBSD: bus.h,v 1.7 2003/01/28 01:08:04 kent Exp $ */
/*
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -486,6 +486,7 @@ __NEWSMIPS_copy_region(4)
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
#define NEWSMIPS_DMAMAP_COHERENT 0x10000 /* no cache flush necessary on sync */
#define NEWSMIPS_DMAMAP_MAPTBL 0x20000 /* use DMA maping table */
diff --git a/sys/arch/ofppc/include/bus.h b/sys/arch/ofppc/include/bus.h
index 945372fb9d5..061e5daad31 100644
--- a/sys/arch/ofppc/include/bus.h
+++ b/sys/arch/ofppc/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.2 2002/09/16 02:12:30 chs Exp $ */
+/* $NetBSD: bus.h,v 1.3 2003/01/28 01:08:04 kent Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -506,6 +506,7 @@ do { \
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* Forwards needed by prototypes below. */
struct mbuf;
diff --git a/sys/arch/playstation2/include/bus.h b/sys/arch/playstation2/include/bus.h
index 10c54251a78..7da99b17e9c 100644
--- a/sys/arch/playstation2/include/bus.h
+++ b/sys/arch/playstation2/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.3 2002/08/14 17:02:07 kent Exp $ */
+/* $NetBSD: bus.h,v 1.4 2003/01/28 01:08:04 kent Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -736,6 +736,7 @@ void bus_space_destroy(bus_space_tag_t);
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
#define PLAYSTATION2_DMAMAP_COHERENT 0x10000 /* no cache flush necessary on sync */
diff --git a/sys/arch/pmax/include/bus.h b/sys/arch/pmax/include/bus.h
index 01cf3933b8e..0644b6b8f78 100644
--- a/sys/arch/pmax/include/bus.h
+++ b/sys/arch/pmax/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.17 2002/03/17 21:45:08 simonb Exp $ */
+/* $NetBSD: bus.h,v 1.18 2003/01/28 01:08:05 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -499,6 +499,7 @@ __PMAX_copy_region(4)
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
#define PMAX_DMAMAP_COHERENT 0x10000 /* no cache flush necessary on sync */
diff --git a/sys/arch/powerpc/include/bus.h b/sys/arch/powerpc/include/bus.h
index 800672fbd23..654ffb260f0 100644
--- a/sys/arch/powerpc/include/bus.h
+++ b/sys/arch/powerpc/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.4 2002/05/31 11:31:30 augustss Exp $ */
+/* $NetBSD: bus.h,v 1.5 2003/01/28 01:08:05 kent Exp $ */
/* $OpenBSD: bus.h,v 1.1 1997/10/13 10:53:42 pefo Exp $ */
/*-
@@ -994,6 +994,7 @@ bus_space_copy_region_4(t, h1, o1, h2, o2, c)
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* Forwards needed by prototypes below. */
struct mbuf;
diff --git a/sys/arch/sgimips/include/bus.h b/sys/arch/sgimips/include/bus.h
index ee6424af565..3648a77d3b2 100644
--- a/sys/arch/sgimips/include/bus.h
+++ b/sys/arch/sgimips/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.6 2002/12/23 20:41:47 pooka Exp $ */
+/* $NetBSD: bus.h,v 1.7 2003/01/28 01:08:05 kent Exp $ */
/*
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -488,6 +488,7 @@ __SGIMIPS_copy_region(4)
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
#define SGIMIPS_DMAMAP_COHERENT 0x10000 /* no cache flush necessary on sync */
diff --git a/sys/arch/sh5/include/bus.h b/sys/arch/sh5/include/bus.h
index 90d8199a221..3ec647deba8 100644
--- a/sys/arch/sh5/include/bus.h
+++ b/sys/arch/sh5/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.3 2002/10/01 07:55:17 scw Exp $ */
+/* $NetBSD: bus.h,v 1.4 2003/01/28 01:08:06 kent Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -874,6 +874,7 @@ bus_space_barrier(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* Forwards needed by prototypes below. */
struct mbuf;
diff --git a/sys/arch/sparc/include/bus.h b/sys/arch/sparc/include/bus.h
index 0f2a2f6ddc8..0e0dacc5d8a 100644
--- a/sys/arch/sparc/include/bus.h
+++ b/sys/arch/sparc/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.37 2003/01/03 13:23:39 martin Exp $ */
+/* $NetBSD: bus.h,v 1.38 2003/01/28 01:08:06 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -1283,6 +1283,7 @@ bus_space_copy_region_8(t, h1, o1, h2, o2, c)
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* For devices that have a 24-bit address space */
#define BUS_DMA_24BIT BUS_DMA_BUS1
diff --git a/sys/arch/sparc64/include/bus.h b/sys/arch/sparc64/include/bus.h
index 37fcb25f36f..f41101c7fbf 100644
--- a/sys/arch/sparc64/include/bus.h
+++ b/sys/arch/sparc64/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.41 2002/12/10 13:44:52 pk Exp $ */
+/* $NetBSD: bus.h,v 1.42 2003/01/28 01:08:07 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -1386,6 +1386,7 @@ bus_space_copy_region_stream_8(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_NOCACHE 0x800 /* hint: map non-cached memory */
#define BUS_DMA_NOCACHE BUS_DMA_BUS1
diff --git a/sys/arch/sun68k/include/bus.h b/sys/arch/sun68k/include/bus.h
index 9436132ee94..c8c8035df72 100644
--- a/sys/arch/sun68k/include/bus.h
+++ b/sys/arch/sun68k/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.3 2001/11/30 16:04:25 fredette Exp $ */
+/* $NetBSD: bus.h,v 1.4 2003/01/28 01:08:07 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -1021,6 +1021,7 @@ bus_space_copy_region_8(t, h1, o1, h2, o2, c)
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* For devices that have a 24-bit address space */
#define BUS_DMA_24BIT BUS_DMA_BUS1
diff --git a/sys/arch/vax/include/bus.h b/sys/arch/vax/include/bus.h
index c48a1b2309c..bd71fd39d8f 100644
--- a/sys/arch/vax/include/bus.h
+++ b/sys/arch/vax/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.20 2002/12/01 21:21:44 matt Exp $ */
+/* $NetBSD: bus.h,v 1.21 2003/01/28 01:08:07 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -878,6 +878,7 @@ vax_mem_copy_region_4(t, h1, o1, h2, o2, c)
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
#define VAX_BUS_DMA_SPILLPAGE BUS_DMA_BUS1 /* VS4000 kludge */
/*
diff --git a/sys/arch/x68k/include/bus.h b/sys/arch/x68k/include/bus.h
index 7f5e168ff36..ecc6ecf1cd9 100644
--- a/sys/arch/x68k/include/bus.h
+++ b/sys/arch/x68k/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.9 2001/11/11 01:38:00 isaki Exp $ */
+/* $NetBSD: bus.h,v 1.10 2003/01/28 01:08:08 kent Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -912,6 +912,7 @@ int x68k_bus_dmamem_alloc_range __P((bus_dma_tag_t tag, bus_size_t size,
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/*
* Operations performed by bus_dmamap_sync().
diff --git a/sys/arch/x86_64/include/bus.h b/sys/arch/x86_64/include/bus.h
index 879ea9877c3..211fd4a6f2f 100644
--- a/sys/arch/x86_64/include/bus.h
+++ b/sys/arch/x86_64/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.4 2002/01/25 22:01:42 fvdl Exp $ */
+/* $NetBSD: bus.h,v 1.5 2003/01/28 01:08:09 kent Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -1067,6 +1067,7 @@ x86_64_memio_copy_region_4(t, h1, o1, h2, o2, c)
#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 BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
/* Forwards needed by prototypes below. */
struct mbuf;