summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-12-03 15:46:08 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-12-03 15:46:08 +0000
commiteed4923e178ed7783b0dac916688e40dce6372cb (patch)
tree7763d5d2b02b9bbb4e82cd54fdc2d9052c4d6cfc /sys/arch/i386
parente5cb898edd1b10cebb2a4a4531325af2b64c6114 (diff)
Remove the x86 and i386 prefixes to the bus_dma types. It's really quite
pointless and just makes the code different for no reason. This moves i386 and amd64 bus_dma to being a lot closer to identical. suggestion to just remove the prefix instead of merge them from deraadt@. no objections art@, kettenis@, ok weingart@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/eisa/eisa_machdep.c6
-rw-r--r--sys/arch/i386/eisa/eisa_machdep.h4
-rw-r--r--sys/arch/i386/i386/bus_space.c3
-rw-r--r--sys/arch/i386/i386/machdep.c10
-rw-r--r--sys/arch/i386/include/bus.h18
-rw-r--r--sys/arch/i386/isa/isa_machdep.c6
-rw-r--r--sys/arch/i386/isa/isa_machdep.h4
-rw-r--r--sys/arch/i386/pci/pci_machdep.c6
-rw-r--r--sys/arch/i386/pci/pci_machdep.h4
9 files changed, 30 insertions, 31 deletions
diff --git a/sys/arch/i386/eisa/eisa_machdep.c b/sys/arch/i386/eisa/eisa_machdep.c
index 8bd310840cd..ebe6c98f6c6 100644
--- a/sys/arch/i386/eisa/eisa_machdep.c
+++ b/sys/arch/i386/eisa/eisa_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eisa_machdep.c,v 1.11 2008/06/26 05:42:10 ray Exp $ */
+/* $OpenBSD: eisa_machdep.c,v 1.12 2008/12/03 15:46:06 oga Exp $ */
/* $NetBSD: eisa_machdep.c,v 1.10.22.2 2000/06/25 19:36:58 sommerfeld Exp $ */
/*-
@@ -72,7 +72,7 @@
#include <sys/errno.h>
#include <sys/device.h>
-#define _I386_BUS_DMA_PRIVATE
+#define _BUS_DMA_PRIVATE
#include <machine/bus.h>
#include <machine/i8259.h>
@@ -83,7 +83,7 @@
* EISA doesn't have any special needs; just use the generic versions
* of these funcions.
*/
-struct i386_bus_dma_tag eisa_bus_dma_tag = {
+struct bus_dma_tag eisa_bus_dma_tag = {
NULL, /* _cookie */
_bus_dmamap_create,
_bus_dmamap_destroy,
diff --git a/sys/arch/i386/eisa/eisa_machdep.h b/sys/arch/i386/eisa/eisa_machdep.h
index fccdd343245..d8004a3a854 100644
--- a/sys/arch/i386/eisa/eisa_machdep.h
+++ b/sys/arch/i386/eisa/eisa_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: eisa_machdep.h,v 1.6 2004/06/13 21:49:15 niklas Exp $ */
+/* $OpenBSD: eisa_machdep.h,v 1.7 2008/12/03 15:46:06 oga Exp $ */
/* $NetBSD: eisa_machdep.h,v 1.4 1997/06/06 23:12:52 thorpej Exp $ */
/*
@@ -43,7 +43,7 @@
#define EISA_ID_LEN (sizeof(EISA_ID) - 1)
#define EISA_ID_PADDR 0xfffd9
-extern struct i386_bus_dma_tag eisa_bus_dma_tag;
+extern struct bus_dma_tag eisa_bus_dma_tag;
#define ELCR0 0x4d0 /* eisa irq 0-7 */
#define ELCR1 0x4d1 /* eisa irq 8-15 */
diff --git a/sys/arch/i386/i386/bus_space.c b/sys/arch/i386/i386/bus_space.c
index 000de7d0f99..58d03ad95d4 100644
--- a/sys/arch/i386/i386/bus_space.c
+++ b/sys/arch/i386/i386/bus_space.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_space.c,v 1.1 2008/11/22 17:45:20 oga Exp $ */
+/* $OpenBSD: bus_space.c,v 1.2 2008/12/03 15:46:06 oga Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -66,7 +66,6 @@
#include <sys/malloc.h>
#include <sys/extent.h>
-#define _I386_BUS_DMA_PRIVATE
#include <machine/bus.h>
u_int8_t
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 45ae08f2b63..59be3e267b1 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.439 2008/11/22 18:12:32 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.440 2008/12/03 15:46:06 oga Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -105,7 +105,7 @@
#include <uvm/uvm_extern.h>
#include <uvm/uvm_swap.h>
-#define _I386_BUS_DMA_PRIVATE
+#define _BUS_DMA_PRIVATE
#include <machine/bus.h>
#include <machine/cpu.h>
@@ -3679,7 +3679,7 @@ int
_bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
bus_size_t maxsegsz, bus_size_t boundary, int flags, bus_dmamap_t *dmamp)
{
- struct i386_bus_dmamap *map;
+ struct bus_dmamap *map;
void *mapstore;
size_t mapsize;
@@ -3695,13 +3695,13 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
* The bus_dmamap_t includes one bus_dma_segment_t, hence
* the (nsegments - 1).
*/
- mapsize = sizeof(struct i386_bus_dmamap) +
+ mapsize = sizeof(struct bus_dmamap) +
(sizeof(bus_dma_segment_t) * (nsegments - 1));
if ((mapstore = malloc(mapsize, M_DEVBUF,
((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK) | M_ZERO)) == NULL)
return (ENOMEM);
- map = (struct i386_bus_dmamap *)mapstore;
+ map = (struct bus_dmamap *)mapstore;
map->_dm_size = size;
map->_dm_segcnt = nsegments;
map->_dm_maxsegsz = maxsegsz;
diff --git a/sys/arch/i386/include/bus.h b/sys/arch/i386/include/bus.h
index bb58a12fe8c..6a6ccbc933e 100644
--- a/sys/arch/i386/include/bus.h
+++ b/sys/arch/i386/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.44 2008/11/22 17:45:20 oga Exp $ */
+/* $OpenBSD: bus.h,v 1.45 2008/12/03 15:46:06 oga Exp $ */
/* $NetBSD: bus.h,v 1.6 1996/11/10 03:19:25 thorpej Exp $ */
/*-
@@ -466,8 +466,8 @@ struct uio;
#define BUS_DMASYNC_PREWRITE 0x04
#define BUS_DMASYNC_POSTWRITE 0x08
-typedef struct i386_bus_dma_tag *bus_dma_tag_t;
-typedef struct i386_bus_dmamap *bus_dmamap_t;
+typedef struct bus_dma_tag *bus_dma_tag_t;
+typedef struct bus_dmamap *bus_dmamap_t;
/*
* bus_dma_segment_t
@@ -475,11 +475,11 @@ typedef struct i386_bus_dmamap *bus_dmamap_t;
* Describes a single contiguous DMA transaction. Values
* are suitable for programming into DMA registers.
*/
-struct i386_bus_dma_segment {
+struct bus_dma_segment {
bus_addr_t ds_addr; /* DMA address */
bus_size_t ds_len; /* length of transfer */
};
-typedef struct i386_bus_dma_segment bus_dma_segment_t;
+typedef struct bus_dma_segment bus_dma_segment_t;
/*
* bus_dma_tag_t
@@ -488,7 +488,7 @@ typedef struct i386_bus_dma_segment bus_dma_segment_t;
* DMA for a given bus.
*/
-struct i386_bus_dma_tag {
+struct bus_dma_tag {
void *_cookie; /* cookie used in the guts */
/*
@@ -557,7 +557,7 @@ struct i386_bus_dma_tag {
*
* Describes a DMA mapping.
*/
-struct i386_bus_dmamap {
+struct bus_dmamap {
/*
* PRIVATE MEMBERS: not for use by machine-independent code.
*/
@@ -577,7 +577,7 @@ struct i386_bus_dmamap {
bus_dma_segment_t dm_segs[1]; /* segments; variable length */
};
-#ifdef _I386_BUS_DMA_PRIVATE
+#ifdef _BUS_DMA_PRIVATE
int _bus_dmamap_create(bus_dma_tag_t, bus_size_t, int, bus_size_t,
bus_size_t, int, bus_dmamap_t *);
void _bus_dmamap_destroy(bus_dma_tag_t, bus_dmamap_t);
@@ -609,6 +609,6 @@ int _bus_dmamem_alloc_range(bus_dma_tag_t tag, bus_size_t size,
bus_size_t alignment, bus_size_t boundary,
bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags,
paddr_t low, paddr_t high);
-#endif /* _I386_BUS_DMA_PRIVATE */
+#endif /* _BUS_DMA_PRIVATE */
#endif /* _I386_BUS_H_ */
diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c
index aef54b79227..75ee160842b 100644
--- a/sys/arch/i386/isa/isa_machdep.c
+++ b/sys/arch/i386/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa_machdep.c,v 1.63 2008/06/26 05:42:11 ray Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.64 2008/12/03 15:46:06 oga Exp $ */
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
/*-
@@ -83,7 +83,7 @@
#include <machine/mpbiosvar.h>
#endif
-#define _I386_BUS_DMA_PRIVATE
+#define _BUS_DMA_PRIVATE
#include <machine/bus.h>
#include <machine/intr.h>
@@ -145,7 +145,7 @@ void _isa_dma_free_bouncebuf(bus_dma_tag_t, bus_dmamap_t);
* the generic functions that understand how to deal with bounce
* buffers, if necessary.
*/
-struct i386_bus_dma_tag isa_bus_dma_tag = {
+struct bus_dma_tag isa_bus_dma_tag = {
NULL, /* _cookie */
_isa_bus_dmamap_create,
_isa_bus_dmamap_destroy,
diff --git a/sys/arch/i386/isa/isa_machdep.h b/sys/arch/i386/isa/isa_machdep.h
index 0706775654a..7da886a15d6 100644
--- a/sys/arch/i386/isa/isa_machdep.h
+++ b/sys/arch/i386/isa/isa_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa_machdep.h,v 1.22 2008/06/26 05:42:11 ray Exp $ */
+/* $OpenBSD: isa_machdep.h,v 1.23 2008/12/03 15:46:07 oga Exp $ */
/* $NetBSD: isa_machdep.h,v 1.7 1997/06/06 23:28:42 thorpej Exp $ */
/*-
@@ -112,7 +112,7 @@ void isa_intr_disestablish(isa_chipset_tag_t ic, void *handler);
* BY PORTABLE CODE.
*/
-extern struct i386_bus_dma_tag isa_bus_dma_tag;
+extern struct bus_dma_tag isa_bus_dma_tag;
/*
* Cookie used by ISA dma. A pointer to one of these it stashed in
diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c
index 0e98f61cb0b..0a0e3f84a0b 100644
--- a/sys/arch/i386/pci/pci_machdep.c
+++ b/sys/arch/i386/pci/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.40 2008/06/26 05:42:11 ray Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.41 2008/12/03 15:46:07 oga Exp $ */
/* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */
/*-
@@ -82,7 +82,7 @@
#include <uvm/uvm_extern.h>
-#define _I386_BUS_DMA_PRIVATE
+#define _BUS_DMA_PRIVATE
#include <machine/bus.h>
#include <machine/pio.h>
#include <machine/i8259.h>
@@ -145,7 +145,7 @@ struct {
* PCI doesn't have any special needs; just use the generic versions
* of these functions.
*/
-struct i386_bus_dma_tag pci_bus_dma_tag = {
+struct bus_dma_tag pci_bus_dma_tag = {
NULL, /* _cookie */
_bus_dmamap_create,
_bus_dmamap_destroy,
diff --git a/sys/arch/i386/pci/pci_machdep.h b/sys/arch/i386/pci/pci_machdep.h
index ffdd5d9d864..2ca513de801 100644
--- a/sys/arch/i386/pci/pci_machdep.h
+++ b/sys/arch/i386/pci/pci_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.h,v 1.11 2002/03/14 03:15:54 millert Exp $ */
+/* $OpenBSD: pci_machdep.h,v 1.12 2008/12/03 15:46:07 oga Exp $ */
/* $NetBSD: pci_machdep.h,v 1.7 1997/06/06 23:29:18 thorpej Exp $ */
/*
@@ -55,7 +55,7 @@ union i386_pci_tag_u {
} mode2;
};
-extern struct i386_bus_dma_tag pci_bus_dma_tag;
+extern struct bus_dma_tag pci_bus_dma_tag;
/*
* Types provided to machine-independent PCI code