summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/alpha/tc/tc_bus_mem.c30
-rw-r--r--sys/arch/amd64/amd64/bus_space.c8
-rw-r--r--sys/arch/amd64/include/bus.h13
-rw-r--r--sys/arch/arm/arm/arm_machdep.c4
-rw-r--r--sys/arch/arm/include/bus.h22
-rw-r--r--sys/arch/landisk/dev/obio.c26
-rw-r--r--sys/arch/landisk/include/bus.h10
-rw-r--r--sys/arch/landisk/landisk/shpcic_machdep.c14
-rw-r--r--sys/arch/luna88k/include/bus.h16
-rw-r--r--sys/arch/macppc/include/bus.h4
-rw-r--r--sys/arch/mvmeppc/include/bus_mi.h18
-rw-r--r--sys/arch/sh/dev/shpcic.c14
-rw-r--r--sys/arch/sh/dev/shpcicvar.h14
-rw-r--r--sys/arch/socppc/include/bus.h4
-rw-r--r--sys/arch/sparc64/sparc64/busop_c.in54
-rw-r--r--sys/arch/sparc64/sparc64/busop_h.in7
-rw-r--r--sys/arch/vax/include/bus.h30
17 files changed, 134 insertions, 154 deletions
diff --git a/sys/arch/alpha/tc/tc_bus_mem.c b/sys/arch/alpha/tc/tc_bus_mem.c
index 1eda503b545..15d39d58fde 100644
--- a/sys/arch/alpha/tc/tc_bus_mem.c
+++ b/sys/arch/alpha/tc/tc_bus_mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tc_bus_mem.c,v 1.16 2009/12/25 20:52:36 miod Exp $ */
+/* $OpenBSD: tc_bus_mem.c,v 1.17 2010/04/04 12:49:27 miod Exp $ */
/* $NetBSD: tc_bus_mem.c,v 1.25 2001/09/04 05:31:28 thorpej Exp $ */
/*
@@ -142,13 +142,13 @@ void tc_mem_set_region_8(void *, bus_space_handle_t,
bus_size_t, u_int64_t, bus_size_t);
/* copy */
-void tc_mem_copy_region_1(void *, bus_space_handle_t,
+void tc_mem_copy_1(void *, bus_space_handle_t,
bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t);
-void tc_mem_copy_region_2(void *, bus_space_handle_t,
+void tc_mem_copy_2(void *, bus_space_handle_t,
bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t);
-void tc_mem_copy_region_4(void *, bus_space_handle_t,
+void tc_mem_copy_4(void *, bus_space_handle_t,
bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t);
-void tc_mem_copy_region_8(void *, bus_space_handle_t,
+void tc_mem_copy_8(void *, bus_space_handle_t,
bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t);
struct alpha_bus_space tc_mem_space = {
@@ -219,10 +219,10 @@ struct alpha_bus_space tc_mem_space = {
tc_mem_set_region_8,
/* copy */
- tc_mem_copy_region_1,
- tc_mem_copy_region_2,
- tc_mem_copy_region_4,
- tc_mem_copy_region_8,
+ tc_mem_copy_1,
+ tc_mem_copy_2,
+ tc_mem_copy_4,
+ tc_mem_copy_8,
};
bus_space_tag_t
@@ -621,9 +621,9 @@ tc_mem_set_region_N(2,u_int16_t)
tc_mem_set_region_N(4,u_int32_t)
tc_mem_set_region_N(8,u_int64_t)
-#define tc_mem_copy_region_N(BYTES) \
+#define tc_mem_copy_N(BYTES) \
void \
-__C(tc_mem_copy_region_,BYTES)(v, h1, o1, h2, o2, c) \
+__C(tc_mem_copy_,BYTES)(v, h1, o1, h2, o2, c) \
void *v; \
bus_space_handle_t h1, h2; \
bus_size_t o1, o2, c; \
@@ -647,7 +647,7 @@ __C(tc_mem_copy_region_,BYTES)(v, h1, o1, h2, o2, c) \
__C(tc_mem_write_,BYTES)(v, h2, o2 + o, \
__C(tc_mem_read_,BYTES)(v, h1, o1 + o)); \
}
-tc_mem_copy_region_N(1)
-tc_mem_copy_region_N(2)
-tc_mem_copy_region_N(4)
-tc_mem_copy_region_N(8)
+tc_mem_copy_N(1)
+tc_mem_copy_N(2)
+tc_mem_copy_N(4)
+tc_mem_copy_N(8)
diff --git a/sys/arch/amd64/amd64/bus_space.c b/sys/arch/amd64/amd64/bus_space.c
index 2e45908648a..d740aa6df1d 100644
--- a/sys/arch/amd64/amd64/bus_space.c
+++ b/sys/arch/amd64/amd64/bus_space.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_space.c,v 1.15 2009/08/11 17:15:54 oga Exp $ */
+/* $OpenBSD: bus_space.c,v 1.16 2010/04/04 12:49:29 miod Exp $ */
/* $NetBSD: bus_space.c,v 1.2 2003/03/14 18:47:53 christos Exp $ */
/*-
@@ -856,7 +856,7 @@ bus_space_set_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
}
void
-bus_space_copy_region_1(bus_space_tag_t t,
+bus_space_copy_1(bus_space_tag_t t,
bus_space_handle_t h1, bus_size_t o1,
bus_space_handle_t h2, bus_size_t o2, size_t c)
{
@@ -891,7 +891,7 @@ bus_space_copy_region_1(bus_space_tag_t t,
}
void
-bus_space_copy_region_2(bus_space_tag_t t,
+bus_space_copy_2(bus_space_tag_t t,
bus_space_handle_t h1, bus_size_t o1,
bus_space_handle_t h2, bus_size_t o2, size_t c)
{
@@ -926,7 +926,7 @@ bus_space_copy_region_2(bus_space_tag_t t,
}
void
-bus_space_copy_region_4(bus_space_tag_t t,
+bus_space_copy_4(bus_space_tag_t t,
bus_space_handle_t h1, bus_size_t o1,
bus_space_handle_t h2, bus_size_t o2, size_t c)
{
diff --git a/sys/arch/amd64/include/bus.h b/sys/arch/amd64/include/bus.h
index 6f97985ea22..7e280528b98 100644
--- a/sys/arch/amd64/include/bus.h
+++ b/sys/arch/amd64/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.21 2009/07/30 21:39:15 miod Exp $ */
+/* $OpenBSD: bus.h,v 1.22 2010/04/04 12:49:30 miod Exp $ */
/* $NetBSD: bus.h,v 1.6 1996/11/10 03:19:25 thorpej Exp $ */
/*-
@@ -392,16 +392,11 @@ void bus_space_set_region_4(bus_space_tag_t, bus_space_handle_t,
* at tag/bsh1/off1 to bus space starting at tag/bsh2/off2.
*/
-#define bus_space_copy_1 bus_space_copy_region_1
-#define bus_space_copy_2 bus_space_copy_region_2
-#define bus_space_copy_4 bus_space_copy_region_4
-#define bus_space_copy_8 bus_space_copy_region_8
-
-void bus_space_copy_region_1(bus_space_tag_t, bus_space_handle_t,
+void bus_space_copy_1(bus_space_tag_t, bus_space_handle_t,
bus_size_t, bus_space_handle_t, bus_size_t, size_t);
-void bus_space_copy_region_2(bus_space_tag_t, bus_space_handle_t,
+void bus_space_copy_2(bus_space_tag_t, bus_space_handle_t,
bus_size_t, bus_space_handle_t, bus_size_t, size_t);
-void bus_space_copy_region_4(bus_space_tag_t, bus_space_handle_t,
+void bus_space_copy_4(bus_space_tag_t, bus_space_handle_t,
bus_size_t, bus_space_handle_t, bus_size_t, size_t);
#if 0 /* Cause a link error for bus_space_copy_8 */
diff --git a/sys/arch/arm/arm/arm_machdep.c b/sys/arch/arm/arm/arm_machdep.c
index c526411b1ec..4fdd397f7a7 100644
--- a/sys/arch/arm/arm/arm_machdep.c
+++ b/sys/arch/arm/arm/arm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arm_machdep.c,v 1.1 2004/02/01 05:09:48 drahn Exp $ */
+/* $OpenBSD: arm_machdep.c,v 1.2 2010/04/04 12:49:30 miod Exp $ */
/* $NetBSD: arm_machdep.c,v 1.7 2003/10/25 19:44:42 scw Exp $ */
/*
@@ -205,6 +205,7 @@ cpu_upcall(struct lwp *l, int type, int nevents, int ninterrupted, void *sas,
#endif
+#if 0
#define _CONCAT(A,B) A ## B
#define __C(A,B) _CONCAT(A,B)
@@ -231,7 +232,6 @@ BUS_SPACE_COPY_N(4,u_int32_t)
-#if 0
#define BUS_SPACE_READ_RAW_MULTI_N(BYTES,SHIFT,TYPE) \
void \
__C(bus_space_read_raw_multi_,BYTES)(bus_space_tag_t bst, \
diff --git a/sys/arch/arm/include/bus.h b/sys/arch/arm/include/bus.h
index e070c49fabb..187ff95fadb 100644
--- a/sys/arch/arm/include/bus.h
+++ b/sys/arch/arm/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.12 2009/07/26 18:48:55 miod Exp $ */
+/* $OpenBSD: bus.h,v 1.13 2010/04/04 12:49:30 miod Exp $ */
/* $NetBSD: bus.h,v 1.12 2003/10/23 15:03:24 scw Exp $ */
/*-
@@ -358,27 +358,15 @@ struct bus_space {
/*
* Copy operations.
*/
-#define bus_space_copy_region_1(t, h1, o1, h2, o2, c) \
+#define bus_space_copy_1(t, h1, o1, h2, o2, c) \
__bs_copy(1, t, h1, o1, h2, o2, c)
-#define bus_space_copy_region_2(t, h1, o1, h2, o2, c) \
+#define bus_space_copy_2(t, h1, o1, h2, o2, c) \
__bs_copy(2, t, h1, o1, h2, o2, c)
-#define bus_space_copy_region_4(t, h1, o1, h2, o2, c) \
+#define bus_space_copy_4(t, h1, o1, h2, o2, c) \
__bs_copy(4, t, h1, o1, h2, o2, c)
-#define bus_space_copy_region_8(t, h1, o1, h2, o2, c) \
+#define bus_space_copy_8(t, h1, o1, h2, o2, c) \
__bs_copy(8, t, h1, o1, h2, o2, c)
-void
-bus_space_copy_1(bus_space_tag_t bst, bus_space_handle_t h1,
- bus_space_handle_t h2, bus_size_t o1, bus_size_t o2, bus_size_t c);
-void
-bus_space_copy_2(bus_space_tag_t bst, bus_space_handle_t h1,
- bus_space_handle_t h2, bus_size_t o1, bus_size_t o2, bus_size_t c);
-void
-bus_space_copy_4(bus_space_tag_t bst, bus_space_handle_t h1,
- bus_space_handle_t h2, bus_size_t o1, bus_size_t o2, bus_size_t c);
-#define bus_space_copy_8 \
- !!! bus_space_copy_8 not implemented !!!
-
/*
* Macros to provide prototypes for all the functions used in the
* bus_space structure
diff --git a/sys/arch/landisk/dev/obio.c b/sys/arch/landisk/dev/obio.c
index 7eed273ffc0..ba103d98042 100644
--- a/sys/arch/landisk/dev/obio.c
+++ b/sys/arch/landisk/dev/obio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: obio.c,v 1.7 2009/12/25 20:52:55 miod Exp $ */
+/* $OpenBSD: obio.c,v 1.8 2010/04/04 12:49:30 miod Exp $ */
/* $NetBSD: obio.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
@@ -426,11 +426,11 @@ void obio_iomem_set_region_2(void *v, bus_space_handle_t bsh,
bus_size_t offset, uint16_t val, bus_size_t count);
void obio_iomem_set_region_4(void *v, bus_space_handle_t bsh,
bus_size_t offset, uint32_t val, bus_size_t count);
-void obio_iomem_copy_region_1(void *v, bus_space_handle_t h1, bus_size_t o1,
+void obio_iomem_copy_1(void *v, bus_space_handle_t h1, bus_size_t o1,
bus_space_handle_t h2, bus_size_t o2, bus_size_t count);
-void obio_iomem_copy_region_2(void *v, bus_space_handle_t h1, bus_size_t o1,
+void obio_iomem_copy_2(void *v, bus_space_handle_t h1, bus_size_t o1,
bus_space_handle_t h2, bus_size_t o2, bus_size_t count);
-void obio_iomem_copy_region_4(void *v, bus_space_handle_t h1, bus_size_t o1,
+void obio_iomem_copy_4(void *v, bus_space_handle_t h1, bus_size_t o1,
bus_space_handle_t h2, bus_size_t o2, bus_size_t count);
struct _bus_space obio_bus_io =
@@ -490,9 +490,9 @@ struct _bus_space obio_bus_io =
.bs_sr_2 = obio_iomem_set_region_2,
.bs_sr_4 = obio_iomem_set_region_4,
- .bs_c_1 = obio_iomem_copy_region_1,
- .bs_c_2 = obio_iomem_copy_region_2,
- .bs_c_4 = obio_iomem_copy_region_4,
+ .bs_c_1 = obio_iomem_copy_1,
+ .bs_c_2 = obio_iomem_copy_2,
+ .bs_c_4 = obio_iomem_copy_4,
};
struct _bus_space obio_bus_mem =
@@ -552,9 +552,9 @@ struct _bus_space obio_bus_mem =
.bs_sr_2 = obio_iomem_set_region_2,
.bs_sr_4 = obio_iomem_set_region_4,
- .bs_c_1 = obio_iomem_copy_region_1,
- .bs_c_2 = obio_iomem_copy_region_2,
- .bs_c_4 = obio_iomem_copy_region_4,
+ .bs_c_1 = obio_iomem_copy_1,
+ .bs_c_2 = obio_iomem_copy_2,
+ .bs_c_4 = obio_iomem_copy_4,
};
/* read */
@@ -901,7 +901,7 @@ obio_iomem_set_region_4(void *v, bus_space_handle_t bsh,
}
void
-obio_iomem_copy_region_1(void *v, bus_space_handle_t h1, bus_size_t o1,
+obio_iomem_copy_1(void *v, bus_space_handle_t h1, bus_size_t o1,
bus_space_handle_t h2, bus_size_t o2, bus_size_t count)
{
volatile uint8_t *addr1 = (void *)(h1 + o1);
@@ -921,7 +921,7 @@ obio_iomem_copy_region_1(void *v, bus_space_handle_t h1, bus_size_t o1,
}
void
-obio_iomem_copy_region_2(void *v, bus_space_handle_t h1, bus_size_t o1,
+obio_iomem_copy_2(void *v, bus_space_handle_t h1, bus_size_t o1,
bus_space_handle_t h2, bus_size_t o2, bus_size_t count)
{
volatile uint16_t *addr1 = (void *)(h1 + o1);
@@ -941,7 +941,7 @@ obio_iomem_copy_region_2(void *v, bus_space_handle_t h1, bus_size_t o1,
}
void
-obio_iomem_copy_region_4(void *v, bus_space_handle_t h1, bus_size_t o1,
+obio_iomem_copy_4(void *v, bus_space_handle_t h1, bus_size_t o1,
bus_space_handle_t h2, bus_size_t o2, bus_size_t count)
{
volatile uint32_t *addr1 = (void *)(h1 + o1);
diff --git a/sys/arch/landisk/include/bus.h b/sys/arch/landisk/include/bus.h
index 14303c7dd94..6cb749469f1 100644
--- a/sys/arch/landisk/include/bus.h
+++ b/sys/arch/landisk/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.6 2009/04/20 00:42:06 oga Exp $ */
+/* $OpenBSD: bus.h,v 1.7 2010/04/04 12:49:30 miod Exp $ */
/* $NetBSD: bus.h,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
@@ -407,13 +407,13 @@ struct _bus_space {
/*
* Copy region operations.
*/
-#define bus_space_copy_region_1(t, h1, o1, h2, o2, c) \
+#define bus_space_copy_1(t, h1, o1, h2, o2, c) \
__bs_copy(1, uint8_t, (t), (h1), (o1), (h2), (o2), (c))
-#define bus_space_copy_region_2(t, h1, o1, h2, o2, c) \
+#define bus_space_copy_2(t, h1, o1, h2, o2, c) \
__bs_copy(2, uint16_t, (t), (h1), (o1), (h2), (o2), (c))
-#define bus_space_copy_region_4(t, h1, o1, h2, o2, c) \
+#define bus_space_copy_4(t, h1, o1, h2, o2, c) \
__bs_copy(4, uint32_t, (t), (h1), (o1), (h2), (o2), (c))
-#define bus_space_copy_region_8(t, h1, o1, h2, o2, c) \
+#define bus_space_copy_8(t, h1, o1, h2, o2, c) \
__bs_copy(8, uint64_t, (t), (h1), (o1), (h2), (o2), (c))
#endif /* _KERNEL */
diff --git a/sys/arch/landisk/landisk/shpcic_machdep.c b/sys/arch/landisk/landisk/shpcic_machdep.c
index 60d82d12eff..cbb082e1afb 100644
--- a/sys/arch/landisk/landisk/shpcic_machdep.c
+++ b/sys/arch/landisk/landisk/shpcic_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shpcic_machdep.c,v 1.4 2009/12/25 20:52:57 miod Exp $ */
+/* $OpenBSD: shpcic_machdep.c,v 1.5 2010/04/04 12:49:30 miod Exp $ */
/* $NetBSD: shpcic_machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*
@@ -234,9 +234,9 @@ struct _bus_space landisk_pci_bus_io =
.bs_sr_2 = shpcic_io_set_region_2,
.bs_sr_4 = shpcic_io_set_region_4,
- .bs_c_1 = shpcic_io_copy_region_1,
- .bs_c_2 = shpcic_io_copy_region_2,
- .bs_c_4 = shpcic_io_copy_region_4,
+ .bs_c_1 = shpcic_io_copy_1,
+ .bs_c_2 = shpcic_io_copy_2,
+ .bs_c_4 = shpcic_io_copy_4,
};
struct _bus_space landisk_pci_bus_mem =
@@ -296,7 +296,7 @@ struct _bus_space landisk_pci_bus_mem =
.bs_sr_2 = shpcic_mem_set_region_2,
.bs_sr_4 = shpcic_mem_set_region_4,
- .bs_c_1 = shpcic_mem_copy_region_1,
- .bs_c_2 = shpcic_mem_copy_region_2,
- .bs_c_4 = shpcic_mem_copy_region_4,
+ .bs_c_1 = shpcic_mem_copy_1,
+ .bs_c_2 = shpcic_mem_copy_2,
+ .bs_c_4 = shpcic_mem_copy_4,
};
diff --git a/sys/arch/luna88k/include/bus.h b/sys/arch/luna88k/include/bus.h
index 634808f7e08..471310edde3 100644
--- a/sys/arch/luna88k/include/bus.h
+++ b/sys/arch/luna88k/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.5 2009/07/26 18:48:55 miod Exp $ */
+/* $OpenBSD: bus.h,v 1.6 2010/04/04 12:49:30 miod Exp $ */
/* $NetBSD: bus.h,v 1.9 1998/01/13 18:32:15 scottr Exp $ */
/*-
@@ -442,15 +442,15 @@ bus_space_set_region_4(bus_space_tag_t tag, bus_space_handle_t handle,
* at tag/bsh1/off1 to bus space starting at tag/bsh2/off2.
*/
-#define __LUNA88K_copy_region_N(BYTES) \
-static __inline void __CONCAT(bus_space_copy_region_,BYTES) \
+#define __LUNA88K_copy_N(BYTES) \
+static __inline void __CONCAT(bus_space_copy_,BYTES) \
(bus_space_tag_t, \
bus_space_handle_t bsh1, bus_size_t off1, \
bus_space_handle_t bsh2, bus_size_t off2, \
bus_size_t count); \
\
static __inline void \
-__CONCAT(bus_space_copy_region_,BYTES)(t, h1, o1, h2, o2, c) \
+__CONCAT(bus_space_copy_,BYTES)(t, h1, o1, h2, o2, c) \
bus_space_tag_t t; \
bus_space_handle_t h1, h2; \
bus_size_t o1, o2, c; \
@@ -469,15 +469,15 @@ __CONCAT(bus_space_copy_region_,BYTES)(t, h1, o1, h2, o2, c) \
__CONCAT(bus_space_read_,BYTES)(t, h1, o1 + o)); \
} \
}
-__LUNA88K_copy_region_N(1)
-__LUNA88K_copy_region_N(2)
-__LUNA88K_copy_region_N(4)
+__LUNA88K_copy_N(1)
+__LUNA88K_copy_N(2)
+__LUNA88K_copy_N(4)
#if 0 /* Cause a link error for bus_space_copy_8 */
#define bus_space_copy_8 \
!!! bus_space_copy_8 unimplemented !!!
#endif
-#undef __LUNA88K_copy_region_N
+#undef __LUNA88K_copy_N
/*
* Bus read/write barrier methods.
diff --git a/sys/arch/macppc/include/bus.h b/sys/arch/macppc/include/bus.h
index 814e00a7ceb..3d9c043594c 100644
--- a/sys/arch/macppc/include/bus.h
+++ b/sys/arch/macppc/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.17 2009/07/30 21:39:15 miod Exp $ */
+/* $OpenBSD: bus.h,v 1.18 2010/04/04 12:49:30 miod Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom. All rights reserved.
@@ -431,7 +431,7 @@ void
bus_space_copy_4(void *v, bus_space_handle_t h1, bus_space_handle_t h2,
bus_size_t o1, bus_size_t o2, bus_size_t c);
#define bus_space_copy_8 \
- !!! bus_space_write_raw_multi_8 not implemented !!!
+ !!! bus_space_copy_8 not implemented !!!
/*
* Bus read/write barrier methods.
diff --git a/sys/arch/mvmeppc/include/bus_mi.h b/sys/arch/mvmeppc/include/bus_mi.h
index b0b72687bb8..a6bdedf978d 100644
--- a/sys/arch/mvmeppc/include/bus_mi.h
+++ b/sys/arch/mvmeppc/include/bus_mi.h
@@ -1,5 +1,5 @@
/* $NetBSD: bus.h,v 1.1 2001/06/06 17:37:37 matt Exp $ */
-/* $OpenBSD: bus_mi.h,v 1.11 2009/05/31 17:42:13 miod Exp $ */
+/* $OpenBSD: bus_mi.h,v 1.12 2010/04/04 12:49:30 miod Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -839,7 +839,7 @@ bus_space_set_region_stream_4(tag, bsh, offset, val, count)
!!! bus_space_set_region_stream_8 unimplemented !!!
/*
- * void bus_space_copy_region_N(bus_space_tag_t tag,
+ * void bus_space_copy_N(bus_space_tag_t tag,
* bus_space_handle_t bsh1, bus_size_t off1,
* bus_space_handle_t bsh2, bus_size_t off2,
* size_t count);
@@ -848,18 +848,18 @@ bus_space_set_region_stream_4(tag, bsh, offset, val, count)
* at tag/bsh1/off1 to bus space starting at tag/bsh2/off2.
*/
-static __inline void bus_space_copy_region_1(bus_space_tag_t,
+static __inline void bus_space_copy_1(bus_space_tag_t,
bus_space_handle_t, bus_size_t, bus_space_handle_t,
bus_size_t, size_t);
-static __inline void bus_space_copy_region_2(bus_space_tag_t,
+static __inline void bus_space_copy_2(bus_space_tag_t,
bus_space_handle_t, bus_size_t, bus_space_handle_t,
bus_size_t, size_t);
-static __inline void bus_space_copy_region_4(bus_space_tag_t,
+static __inline void bus_space_copy_4(bus_space_tag_t,
bus_space_handle_t, bus_size_t, bus_space_handle_t,
bus_size_t, size_t);
static __inline void
-bus_space_copy_region_1(t, h1, o1, h2, o2, c)
+bus_space_copy_1(t, h1, o1, h2, o2, c)
bus_space_tag_t t;
bus_space_handle_t h1;
bus_size_t o1;
@@ -885,7 +885,7 @@ bus_space_copy_region_1(t, h1, o1, h2, o2, c)
}
static __inline void
-bus_space_copy_region_2(t, h1, o1, h2, o2, c)
+bus_space_copy_2(t, h1, o1, h2, o2, c)
bus_space_tag_t t;
bus_space_handle_t h1;
bus_size_t o1;
@@ -911,7 +911,7 @@ bus_space_copy_region_2(t, h1, o1, h2, o2, c)
}
static __inline void
-bus_space_copy_region_4(t, h1, o1, h2, o2, c)
+bus_space_copy_4(t, h1, o1, h2, o2, c)
bus_space_tag_t t;
bus_space_handle_t h1;
bus_size_t o1;
@@ -936,7 +936,7 @@ bus_space_copy_region_4(t, h1, o1, h2, o2, c)
}
}
-#define bus_space_copy_region_8 !!! bus_space_copy_region_8 unimplemented !!!
+#define bus_space_copy_8 !!! bus_space_copy_8 unimplemented !!!
/*
* Bus read/write barrier methods.
diff --git a/sys/arch/sh/dev/shpcic.c b/sys/arch/sh/dev/shpcic.c
index 93e46f21191..6bb9f8487ce 100644
--- a/sys/arch/sh/dev/shpcic.c
+++ b/sys/arch/sh/dev/shpcic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shpcic.c,v 1.10 2009/12/25 20:52:57 miod Exp $ */
+/* $OpenBSD: shpcic.c,v 1.11 2010/04/04 12:49:30 miod Exp $ */
/* $NetBSD: shpcic.c,v 1.10 2005/12/24 20:07:32 perry Exp $ */
/*
@@ -1192,7 +1192,7 @@ shpcic_mem_set_region_4(void *v, bus_space_handle_t bsh,
* copy region
*/
void
-shpcic_io_copy_region_1(void *v, bus_space_handle_t bsh1,
+shpcic_io_copy_1(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2, bus_size_t count)
{
u_long addr1 = bsh1 + off1;
@@ -1219,7 +1219,7 @@ shpcic_io_copy_region_1(void *v, bus_space_handle_t bsh1,
}
void
-shpcic_io_copy_region_2(void *v, bus_space_handle_t bsh1,
+shpcic_io_copy_2(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2, bus_size_t count)
{
u_long addr1 = bsh1 + off1;
@@ -1246,7 +1246,7 @@ shpcic_io_copy_region_2(void *v, bus_space_handle_t bsh1,
}
void
-shpcic_io_copy_region_4(void *v, bus_space_handle_t bsh1,
+shpcic_io_copy_4(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2, bus_size_t count)
{
u_long addr1 = bsh1 + off1;
@@ -1273,7 +1273,7 @@ shpcic_io_copy_region_4(void *v, bus_space_handle_t bsh1,
}
void
-shpcic_mem_copy_region_1(void *v, bus_space_handle_t bsh1,
+shpcic_mem_copy_1(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2, bus_size_t count)
{
u_long addr1 = bsh1 + off1;
@@ -1300,7 +1300,7 @@ shpcic_mem_copy_region_1(void *v, bus_space_handle_t bsh1,
}
void
-shpcic_mem_copy_region_2(void *v, bus_space_handle_t bsh1,
+shpcic_mem_copy_2(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2, bus_size_t count)
{
u_long addr1 = bsh1 + off1;
@@ -1327,7 +1327,7 @@ shpcic_mem_copy_region_2(void *v, bus_space_handle_t bsh1,
}
void
-shpcic_mem_copy_region_4(void *v, bus_space_handle_t bsh1,
+shpcic_mem_copy_4(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2, bus_size_t count)
{
u_long addr1 = bsh1 + off1;
diff --git a/sys/arch/sh/dev/shpcicvar.h b/sys/arch/sh/dev/shpcicvar.h
index a260c3d89e5..90c85702d21 100644
--- a/sys/arch/sh/dev/shpcicvar.h
+++ b/sys/arch/sh/dev/shpcicvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: shpcicvar.h,v 1.4 2009/12/25 20:52:57 miod Exp $ */
+/* $OpenBSD: shpcicvar.h,v 1.5 2010/04/04 12:49:30 miod Exp $ */
/* $NetBSD: shpcicvar.h,v 1.6 2005/12/11 12:18:58 christos Exp $ */
/*-
@@ -229,22 +229,22 @@ void shpcic_mem_set_region_4(void *v, bus_space_handle_t bsh,
bus_size_t offset, uint32_t val, bus_size_t count);
/* copy region */
-void shpcic_io_copy_region_1(void *v, bus_space_handle_t bsh1,
+void shpcic_io_copy_1(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2,
bus_size_t count);
-void shpcic_io_copy_region_2(void *v, bus_space_handle_t bsh1,
+void shpcic_io_copy_2(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2,
bus_size_t count);
-void shpcic_io_copy_region_4(void *v, bus_space_handle_t bsh1,
+void shpcic_io_copy_4(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2,
bus_size_t count);
-void shpcic_mem_copy_region_1(void *v, bus_space_handle_t bsh1,
+void shpcic_mem_copy_1(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2,
bus_size_t count);
-void shpcic_mem_copy_region_2(void *v, bus_space_handle_t bsh1,
+void shpcic_mem_copy_2(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2,
bus_size_t count);
-void shpcic_mem_copy_region_4(void *v, bus_space_handle_t bsh1,
+void shpcic_mem_copy_4(void *v, bus_space_handle_t bsh1,
bus_size_t off1, bus_space_handle_t bsh2, bus_size_t off2,
bus_size_t count);
#endif /* SH_DEV_PCICVAR_H */
diff --git a/sys/arch/socppc/include/bus.h b/sys/arch/socppc/include/bus.h
index 2a21c6d5eed..89628f2c7af 100644
--- a/sys/arch/socppc/include/bus.h
+++ b/sys/arch/socppc/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.5 2009/07/30 21:39:15 miod Exp $ */
+/* $OpenBSD: bus.h,v 1.6 2010/04/04 12:49:30 miod Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom. All rights reserved.
@@ -431,7 +431,7 @@ void
bus_space_copy_4(void *v, bus_space_handle_t h1, bus_space_handle_t h2,
bus_size_t o1, bus_size_t o2, bus_size_t c);
#define bus_space_copy_8 \
- !!! bus_space_write_raw_multi_8 not implemented !!!
+ !!! bus_space_copy_8 not implemented !!!
/*
* Bus read/write barrier methods.
diff --git a/sys/arch/sparc64/sparc64/busop_c.in b/sys/arch/sparc64/sparc64/busop_c.in
index 4341694d494..55b41e40762 100644
--- a/sys/arch/sparc64/sparc64/busop_c.in
+++ b/sys/arch/sparc64/sparc64/busop_c.in
@@ -1,4 +1,4 @@
-ECHO:/* $OpenBSD: busop_c.in,v 1.1 2003/02/17 01:29:20 henric Exp $ */
+ECHO:/* $OpenBSD: busop_c.in,v 1.2 2010/04/04 12:49:30 miod Exp $ */
ECHO:
ECHO:/*
ECHO: * Copyright (c) 2003 Henric Jungheim
@@ -47,7 +47,7 @@ RAW: void *a, size_t c)
("bsrm<NUM>(%llx + %llx, %x, %x) ->", (long long)h.bh_ptr,
(long long)o, t-><ASI>, c));
RAW: c /= sizeof(<TYPE>);
-
+
++c; /* Looping on "--c" is slightly faster than on "c--" */
asi_set(t-><ASI>);
while (--c > 0) {
@@ -55,7 +55,7 @@ RAW: c /= sizeof(<TYPE>);
BUS_SPACE_TRACE(t, h, (" <FMT>", r));
*p++ = r;
}
-
+
BUS_SPACE_TRACE(t, h, ("\n"));
}
@@ -171,30 +171,28 @@ RAW: c /= sizeof(<TYPE>);
<STORE>_asi(ptr, v);
}
-void
-bus_space_copy_<RAW>region_<NUM>(bus_space_tag_t t, bus_space_handle_t h1,
- bus_size_t o1, bus_space_handle_t h2, bus_size_t o2,
+NRAW:void
+NRAW:bus_space_copy_<RAW><NUM>(bus_space_tag_t t, bus_space_handle_t h1,
+NRAW: bus_size_t o1, bus_space_handle_t h2, bus_size_t o2,
NRAW: bus_size_t c)
-RAW: size_t c)
-{
- paddr_t ptr1 = h1.bh_ptr + o1;
- paddr_t ptr2 = h2.bh_ptr + o2;
-
- BUS_SPACE_ASSERT(t, h1, o2, <NUM>);
- BUS_SPACE_ASSERT(t, h2, o2, <NUM>);
- BUS_SPACE_TRACE(t, h1,
- ("bscr<NUM>(%llx + %llx, %llx + %llx, %x, %x) <-> \n",
- (long long)h1.bh_ptr, (long long)o1,
- (long long)h2.bh_ptr, (long long)o2,
- t-><ASI>, c));
-RAW: c /= sizeof(<TYPE>);
-
- asi_set(t-><ASI>);
- for (; c; c--, ptr1 += <NUM>, ptr2 += <NUM>) {
- <TYPE> r = <LOAD>_asi(ptr2);
- BUS_SPACE_TRACE(t, h1, (" <FMT>", r));
- <STORE>_asi(ptr1, r);
- }
- BUS_SPACE_TRACE(t, h1, ("\n"));
-}
+NRAW:{
+NRAW: paddr_t ptr1 = h1.bh_ptr + o1;
+NRAW: paddr_t ptr2 = h2.bh_ptr + o2;
+NRAW:
+NRAW: BUS_SPACE_ASSERT(t, h1, o2, <NUM>);
+NRAW: BUS_SPACE_ASSERT(t, h2, o2, <NUM>);
+NRAW: BUS_SPACE_TRACE(t, h1,
+NRAW: ("bscr<NUM>(%llx + %llx, %llx + %llx, %x, %x) <-> \n",
+NRAW: (long long)h1.bh_ptr, (long long)o1,
+NRAW: (long long)h2.bh_ptr, (long long)o2,
+NRAW: t-><ASI>, c));
+NRAW:
+NRAW: asi_set(t-><ASI>);
+NRAW: for (; c; c--, ptr1 += <NUM>, ptr2 += <NUM>) {
+NRAW: <TYPE> r = <LOAD>_asi(ptr2);
+NRAW: BUS_SPACE_TRACE(t, h1, (" <FMT>", r));
+NRAW: <STORE>_asi(ptr1, r);
+NRAW: }
+NRAW: BUS_SPACE_TRACE(t, h1, ("\n"));
+NRAW:}
diff --git a/sys/arch/sparc64/sparc64/busop_h.in b/sys/arch/sparc64/sparc64/busop_h.in
index 88ce8e150ce..4b96d712c71 100644
--- a/sys/arch/sparc64/sparc64/busop_h.in
+++ b/sys/arch/sparc64/sparc64/busop_h.in
@@ -1,4 +1,4 @@
-ECHO:/* $OpenBSD: busop_h.in,v 1.1 2003/02/17 01:29:20 henric Exp $ */
+ECHO:/* $OpenBSD: busop_h.in,v 1.2 2010/04/04 12:49:30 miod Exp $ */
ECHO:
ECHO:/*
ECHO: * Copyright (c) 2003 Henric Jungheim
@@ -56,10 +56,9 @@ void bus_space_set_<RAW>region_<NUM>(bus_space_tag_t, bus_space_handle_t,
bus_size_t, <TYPE>,
NRAW: bus_size_t);
RAW: size_t);
-void bus_space_copy_<RAW>region_<NUM>(bus_space_tag_t, bus_space_handle_t,
- bus_size_t, bus_space_handle_t, bus_size_t,
+NRAW:void bus_space_copy_<RAW><NUM>(bus_space_tag_t, bus_space_handle_t,
+NRAW: bus_size_t, bus_space_handle_t, bus_size_t,
NRAW: bus_size_t);
-RAW: size_t);
static inline
<TYPE> bus_space_read_<RAW><NUM>(bus_space_tag_t t, bus_space_handle_t h,
diff --git a/sys/arch/vax/include/bus.h b/sys/arch/vax/include/bus.h
index 4ce5d9a345a..cf0ffaf2180 100644
--- a/sys/arch/vax/include/bus.h
+++ b/sys/arch/vax/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.14 2009/12/26 14:45:35 miod Exp $ */
+/* $OpenBSD: bus.h,v 1.15 2010/04/04 12:49:30 miod Exp $ */
/* $NetBSD: bus.h,v 1.14 2000/06/26 04:56:13 simonb Exp $ */
/*-
@@ -638,7 +638,7 @@ vax_mem_set_region_4(t, h, o, v, c)
#endif
/*
- * void bus_space_copy_region_N(bus_space_tag_t tag,
+ * void bus_space_copy_N(bus_space_tag_t tag,
* bus_space_handle_t bsh1, bus_size_t off1,
* bus_space_handle_t bsh2, bus_size_t off2,
* size_t count);
@@ -647,27 +647,27 @@ vax_mem_set_region_4(t, h, o, v, c)
* at tag/bsh1/off1 to bus space starting at tag/bsh2/off2.
*/
-static __inline void vax_mem_copy_region_1(bus_space_tag_t,
+static __inline void vax_mem_copy_1(bus_space_tag_t,
bus_space_handle_t, bus_size_t, bus_space_handle_t,
bus_size_t, size_t);
-static __inline void vax_mem_copy_region_2(bus_space_tag_t,
+static __inline void vax_mem_copy_2(bus_space_tag_t,
bus_space_handle_t, bus_size_t, bus_space_handle_t,
bus_size_t, size_t);
-static __inline void vax_mem_copy_region_4(bus_space_tag_t,
+static __inline void vax_mem_copy_4(bus_space_tag_t,
bus_space_handle_t, bus_size_t, bus_space_handle_t,
bus_size_t, size_t);
-#define bus_space_copy_region_1(t, h1, o1, h2, o2, c) \
- vax_mem_copy_region_1((t), (h1), (o1), (h2), (o2), (c))
+#define bus_space_copy_1(t, h1, o1, h2, o2, c) \
+ vax_mem_copy_1((t), (h1), (o1), (h2), (o2), (c))
-#define bus_space_copy_region_2(t, h1, o1, h2, o2, c) \
- vax_mem_copy_region_2((t), (h1), (o1), (h2), (o2), (c))
+#define bus_space_copy_2(t, h1, o1, h2, o2, c) \
+ vax_mem_copy_2((t), (h1), (o1), (h2), (o2), (c))
-#define bus_space_copy_region_4(t, h1, o1, h2, o2, c) \
- vax_mem_copy_region_4((t), (h1), (o1), (h2), (o2), (c))
+#define bus_space_copy_4(t, h1, o1, h2, o2, c) \
+ vax_mem_copy_4((t), (h1), (o1), (h2), (o2), (c))
static __inline void
-vax_mem_copy_region_1(t, h1, o1, h2, o2, c)
+vax_mem_copy_1(t, h1, o1, h2, o2, c)
bus_space_tag_t t;
bus_space_handle_t h1;
bus_size_t o1;
@@ -693,7 +693,7 @@ vax_mem_copy_region_1(t, h1, o1, h2, o2, c)
}
static __inline void
-vax_mem_copy_region_2(t, h1, o1, h2, o2, c)
+vax_mem_copy_2(t, h1, o1, h2, o2, c)
bus_space_tag_t t;
bus_space_handle_t h1;
bus_size_t o1;
@@ -719,7 +719,7 @@ vax_mem_copy_region_2(t, h1, o1, h2, o2, c)
}
static __inline void
-vax_mem_copy_region_4(t, h1, o1, h2, o2, c)
+vax_mem_copy_4(t, h1, o1, h2, o2, c)
bus_space_tag_t t;
bus_space_handle_t h1;
bus_size_t o1;
@@ -745,7 +745,7 @@ vax_mem_copy_region_4(t, h1, o1, h2, o2, c)
}
#if 0 /* Cause a link error for bus_space_copy_8 */
-#define bus_space_copy_region_8 !!! bus_space_copy_region_8 unimplemented !!!
+#define bus_space_copy_8 !!! bus_space_copy_8 unimplemented !!!
#endif