summaryrefslogtreecommitdiff
path: root/sys/arch/vax
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-04-12 12:00:04 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-04-12 12:00:04 +0000
commit589c195c6ee3816aad9422a8ef8a18dbfd8d8348 (patch)
treede5161d5a1729f3c5b2dbd28ea4e5ec8df53afca /sys/arch/vax
parent148bc5ddc98fe1eeb56bd565312e7d9ee13ab5ee (diff)
Remove __BUS_SPACE_ADDRESS_SANITY correctly, no cookie for me. Spotted by
djm@
Diffstat (limited to 'sys/arch/vax')
-rw-r--r--sys/arch/vax/include/bus.h110
1 files changed, 22 insertions, 88 deletions
diff --git a/sys/arch/vax/include/bus.h b/sys/arch/vax/include/bus.h
index 44d7cdfb65e..a63e575f374 100644
--- a/sys/arch/vax/include/bus.h
+++ b/sys/arch/vax/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.8 2007/04/10 18:02:48 miod Exp $ */
+/* $OpenBSD: bus.h,v 1.9 2007/04/12 12:00:03 miod Exp $ */
/* $NetBSD: bus.h,v 1.14 2000/06/26 04:56:13 simonb Exp $ */
/*-
@@ -178,12 +178,10 @@ struct vax_bus_space {
(*(volatile u_int8_t *)((h) + (o)))
#define bus_space_read_2(t, h, o) \
- (__BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int16_t, "bus addr"), \
- (*(volatile u_int16_t *)((h) + (o))))
+ (*(volatile u_int16_t *)((h) + (o)))
#define bus_space_read_4(t, h, o) \
- (__BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int32_t, "bus addr"), \
- (*(volatile u_int32_t *)((h) + (o))))
+ (*(volatile u_int32_t *)((h) + (o)))
#if 0 /* Cause a link error for bus_space_read_8 */
#define bus_space_read_8(t, h, o) !!! bus_space_read_8 unimplemented !!!
@@ -208,18 +206,10 @@ static __inline void vax_mem_read_multi_4(bus_space_tag_t,
vax_mem_read_multi_1((t), (h), (o), (a), (c))
#define bus_space_read_multi_2(t, h, o, a, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((a), u_int16_t, "buffer"); \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int16_t, "bus addr"); \
- vax_mem_read_multi_2((t), (h), (o), (a), (c)); \
-} while (0)
+ vax_mem_read_multi_2((t), (h), (o), (a), (c))
#define bus_space_read_multi_4(t, h, o, a, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((a), u_int32_t, "buffer"); \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int32_t, "bus addr"); \
- vax_mem_read_multi_4((t), (h), (o), (a), (c)); \
-} while (0)
+ vax_mem_read_multi_4((t), (h), (o), (a), (c))
#if 0 /* Cause a link error for bus_space_read_multi_8 */
#define bus_space_read_multi_8 !!! bus_space_read_multi_8 unimplemented !!!
@@ -285,23 +275,13 @@ static __inline void vax_mem_read_region_4(bus_space_tag_t,
bus_space_handle_t, bus_size_t, u_int32_t *, size_t);
#define bus_space_read_region_1(t, h, o, a, c) \
-do { \
- vax_mem_read_region_1((t), (h), (o), (a), (c)); \
-} while (0)
+ vax_mem_read_region_1((t), (h), (o), (a), (c))
#define bus_space_read_region_2(t, h, o, a, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((a), u_int16_t, "buffer"); \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int16_t, "bus addr"); \
- vax_mem_read_region_2((t), (h), (o), (a), (c)); \
-} while (0)
+ vax_mem_read_region_2((t), (h), (o), (a), (c))
#define bus_space_read_region_4(t, h, o, a, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((a), u_int32_t, "buffer"); \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int32_t, "bus addr"); \
- vax_mem_read_region_4((t), (h), (o), (a), (c)); \
-} while (0)
+ vax_mem_read_region_4((t), (h), (o), (a), (c))
#if 0 /* Cause a link error for bus_space_read_region_8 */
#define bus_space_read_region_8 \
@@ -360,21 +340,13 @@ vax_mem_read_region_4(t, h, o, a, c)
*/
#define bus_space_write_1(t, h, o, v) \
-do { \
- ((void)(*(volatile u_int8_t *)((h) + (o)) = (v))); \
-} while (0)
+ ((void)(*(volatile u_int8_t *)((h) + (o)) = (v)))
#define bus_space_write_2(t, h, o, v) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int16_t, "bus addr"); \
- ((void)(*(volatile u_int16_t *)((h) + (o)) = (v))); \
-} while (0)
+ ((void)(*(volatile u_int16_t *)((h) + (o)) = (v)))
#define bus_space_write_4(t, h, o, v) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int32_t, "bus addr"); \
- ((void)(*(volatile u_int32_t *)((h) + (o)) = (v))); \
-} while (0)
+ ((void)(*(volatile u_int32_t *)((h) + (o)) = (v)))
#if 0 /* Cause a link error for bus_space_write_8 */
#define bus_space_write_8 !!! bus_space_write_8 not implemented !!!
@@ -396,23 +368,13 @@ static __inline void vax_mem_write_multi_4(bus_space_tag_t,
bus_space_handle_t, bus_size_t, const u_int32_t *, size_t);
#define bus_space_write_multi_1(t, h, o, a, c) \
-do { \
- vax_mem_write_multi_1((t), (h), (o), (a), (c)); \
-} while (0)
+ vax_mem_write_multi_1((t), (h), (o), (a), (c))
#define bus_space_write_multi_2(t, h, o, a, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((a), u_int16_t, "buffer"); \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int16_t, "bus addr"); \
- vax_mem_write_multi_2((t), (h), (o), (a), (c)); \
-} while (0)
+ vax_mem_write_multi_2((t), (h), (o), (a), (c))
#define bus_space_write_multi_4(t, h, o, a, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((a), u_int32_t, "buffer"); \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int32_t, "bus addr"); \
- vax_mem_write_multi_4((t), (h), (o), (a), (c)); \
-} while (0)
+ vax_mem_write_multi_4((t), (h), (o), (a), (c))
#if 0 /* Cause a link error for bus_space_write_multi_8 */
#define bus_space_write_multi_8(t, h, o, a, c) \
@@ -480,18 +442,10 @@ static __inline void vax_mem_write_region_4(bus_space_tag_t,
vax_mem_write_region_1((t), (h), (o), (a), (c))
#define bus_space_write_region_2(t, h, o, a, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((a), u_int16_t, "buffer"); \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int16_t, "bus addr"); \
- vax_mem_write_region_2((t), (h), (o), (a), (c)); \
-} while (0)
+ vax_mem_write_region_2((t), (h), (o), (a), (c))
#define bus_space_write_region_4(t, h, o, a, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((a), u_int32_t, "buffer"); \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int32_t, "bus addr"); \
- vax_mem_write_region_4((t), (h), (o), (a), (c)); \
-} while (0)
+ vax_mem_write_region_4((t), (h), (o), (a), (c))
#if 0 /* Cause a link error for bus_space_write_region_8 */
#define bus_space_write_region_8 \
@@ -560,16 +514,10 @@ static __inline void vax_mem_set_multi_4(bus_space_tag_t,
vax_mem_set_multi_1((t), (h), (o), (v), (c))
#define bus_space_set_multi_2(t, h, o, v, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int16_t, "bus addr"); \
- vax_mem_set_multi_2((t), (h), (o), (v), (c)); \
-} while (0)
+ vax_mem_set_multi_2((t), (h), (o), (v), (c))
#define bus_space_set_multi_4(t, h, o, v, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int32_t, "bus addr"); \
- vax_mem_set_multi_4((t), (h), (o), (v), (c)); \
-} while (0)
+ vax_mem_set_multi_4((t), (h), (o), (v), (c))
static __inline void
vax_mem_set_multi_1(t, h, o, v, c)
@@ -637,16 +585,10 @@ static __inline void vax_mem_set_region_4(bus_space_tag_t,
vax_mem_set_region_1((t), (h), (o), (v), (c))
#define bus_space_set_region_2(t, h, o, v, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int16_t, "bus addr"); \
- vax_mem_set_region_2((t), (h), (o), (v), (c)); \
-} while (0)
+ vax_mem_set_region_2((t), (h), (o), (v), (c))
#define bus_space_set_region_4(t, h, o, v, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((h) + (o), u_int32_t, "bus addr"); \
- vax_mem_set_region_4((t), (h), (o), (v), (c)); \
-} while (0)
+ vax_mem_set_region_4((t), (h), (o), (v), (c))
static __inline void
vax_mem_set_region_1(t, h, o, v, c)
@@ -718,18 +660,10 @@ static __inline void vax_mem_copy_region_4(bus_space_tag_t,
vax_mem_copy_region_1((t), (h1), (o1), (h2), (o2), (c))
#define bus_space_copy_region_2(t, h1, o1, h2, o2, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((h1) + (o1), u_int16_t, "bus addr 1"); \
- __BUS_SPACE_ADDRESS_SANITY((h2) + (o2), u_int16_t, "bus addr 2"); \
- vax_mem_copy_region_2((t), (h1), (o1), (h2), (o2), (c)); \
-} while (0)
+ vax_mem_copy_region_2((t), (h1), (o1), (h2), (o2), (c))
#define bus_space_copy_region_4(t, h1, o1, h2, o2, c) \
-do { \
- __BUS_SPACE_ADDRESS_SANITY((h1) + (o1), u_int32_t, "bus addr 1"); \
- __BUS_SPACE_ADDRESS_SANITY((h2) + (o2), u_int32_t, "bus addr 2"); \
- vax_mem_copy_region_4((t), (h1), (o1), (h2), (o2), (c)); \
-} while (0)
+ vax_mem_copy_region_4((t), (h1), (o1), (h2), (o2), (c))
static __inline void
vax_mem_copy_region_1(t, h1, o1, h2, o2, c)