Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Add a macro to check for sufficient pointer alignme...
details: https://anonhg.NetBSD.org/src/rev/3f2786be7d5c
branches: trunk
changeset: 467369:3f2786be7d5c
user: drochner <drochner%NetBSD.org@localhost>
date: Tue Mar 23 21:29:03 1999 +0000
description:
Add a macro to check for sufficient pointer alignment in bus.h context,
"BUS_SPACE_ALIGNED_POINTER()".
Equal to the param.h "ALIGNED_POINTER()" normally, but obeys additional
requirements of the bus_space_xxx_n() macros. (BUS_SPACE_DEBUG)
diffstat:
sys/arch/alpha/include/bus.h | 5 ++++-
sys/arch/amiga/include/bus.h | 7 ++++---
sys/arch/arm32/include/bus.h | 4 +++-
sys/arch/atari/include/bus.h | 4 +++-
sys/arch/bebox/include/bus.h | 4 +++-
sys/arch/hp300/include/bus.h | 4 +++-
sys/arch/i386/include/bus.h | 5 ++++-
sys/arch/mac68k/include/bus.h | 4 +++-
sys/arch/macppc/include/bus.h | 4 +++-
sys/arch/pmax/include/bus.h | 4 +++-
sys/arch/sparc/include/bus.h | 6 ++++--
sys/arch/sparc64/include/bus.h | 3 ++-
sys/arch/vax/include/bus.h | 5 ++++-
sys/arch/x68k/include/bus.h | 3 ++-
14 files changed, 45 insertions(+), 17 deletions(-)
diffs (265 lines):
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/alpha/include/bus.h
--- a/sys/arch/alpha/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/alpha/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.27 1999/03/04 02:16:56 mjacob Exp $ */
+/* $NetBSD: bus.h,v 1.28 1999/03/23 21:29:03 drochner Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -93,8 +93,11 @@
} \
(void) 0; \
})
+
+#define BUS_SPACE_ALIGNED_POINTER(p, t) __BUS_SPACE_ALIGNED_ADDRESS(p, t)
#else
#define __BUS_SPACE_ADDRESS_SANITY(p, t, d) (void) 0
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
#endif /* BUS_SPACE_DEBUG */
/*
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/amiga/include/bus.h
--- a/sys/arch/amiga/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/amiga/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.9 1998/11/08 21:09:27 is Exp $ */
+/* $NetBSD: bus.h,v 1.10 1999/03/23 21:29:04 drochner Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman. All rights reserved.
@@ -263,11 +263,12 @@
#define bus_space_write_region_stream_2(t, h, o, p, c) \
((t)->absm->bswrs2)((t), (h), (o), (p), (c))
-
+
#define bus_space_set_region_2(t, h, o, v, c) \
((t)->absm->bssr2)((t), (h), (o), (v), (c))
#define bus_space_copy_region_2(t, srch, srco, dsth, dsto, c) \
((t)->absm->bscr2)((t), (srch), (srco), (dsth), (dsto), (c))
-
+
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
#endif /* _AMIGA_BUS_H_ */
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/arm32/include/bus.h
--- a/sys/arch/arm32/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/arm32/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.14 1998/09/20 03:37:29 mark Exp $ */
+/* $NetBSD: bus.h,v 1.15 1999/03/23 21:29:04 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -600,6 +600,8 @@
bs_c_4_proto(f); \
bs_c_8_proto(f);
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
+
/* Bus Space DMA macros */
/*
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/atari/include/bus.h
--- a/sys/arch/atari/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/atari/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.15 1999/01/08 09:25:33 leo Exp $ */
+/* $NetBSD: bus.h,v 1.16 1999/03/23 21:29:04 drochner Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -494,6 +494,8 @@
#define bus_space_copy_region_8(t, h1, o1, h2, o2, c) \
__abs_copy(8, (t), (h1), (o1), (h2), (o2), (c))
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
+
/*
* Flags used in various bus DMA methods.
*/
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/bebox/include/bus.h
--- a/sys/arch/bebox/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/bebox/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.17 1998/10/03 21:24:00 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.18 1999/03/23 21:29:04 drochner Exp $ */
/* $OpenBSD: bus.h,v 1.1 1997/10/13 10:53:42 pefo Exp $ */
/*-
@@ -925,6 +925,8 @@
#define BUS_BARRIER_WRITE BUS_SPACE_BARRIER_WRITE
#endif
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
+
/*
* Bus DMA methods.
*/
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/hp300/include/bus.h
--- a/sys/arch/hp300/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/hp300/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.1 1998/01/11 21:26:04 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.2 1999/03/23 21:29:04 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -594,4 +594,6 @@
#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */
#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
+
#endif /* _HP300_BUS_H_ */
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/i386/include/bus.h
--- a/sys/arch/i386/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/i386/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.22 1998/10/03 21:24:00 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.23 1999/03/23 21:29:04 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -91,8 +91,11 @@
} \
(void) 0; \
})
+
+#define BUS_SPACE_ALIGNED_POINTER(p, t) __BUS_SPACE_ALIGNED_ADDRESS(p, t)
#else
#define __BUS_SPACE_ADDRESS_SANITY(p,t,d) (void) 0
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
#endif /* BUS_SPACE_DEBUG */
/*
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/mac68k/include/bus.h
--- a/sys/arch/mac68k/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/mac68k/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.11 1999/01/06 03:06:45 briggs Exp $ */
+/* $NetBSD: bus.h,v 1.12 1999/03/23 21:29:05 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -599,4 +599,6 @@
#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */
#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
+
#endif /* _MAC68K_BUS_H_ */
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/macppc/include/bus.h
--- a/sys/arch/macppc/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/macppc/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.6 1998/12/06 15:39:12 tsubai Exp $ */
+/* $NetBSD: bus.h,v 1.7 1999/03/23 21:29:05 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -701,6 +701,8 @@
#define BUS_BARRIER_WRITE BUS_SPACE_BARRIER_WRITE
#endif
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
+
/*
* Bus DMA methods.
*/
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/pmax/include/bus.h
--- a/sys/arch/pmax/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/pmax/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.7 1999/01/06 04:18:53 nisimura Exp $ */
+/* $NetBSD: bus.h,v 1.8 1999/03/23 21:29:05 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -475,6 +475,8 @@
#undef __PB_TYPENAME_PREFIX
#undef __PB_TYPENAME
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
+
/*
* Flags used in various bus DMA methods.
*/
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/sparc/include/bus.h
--- a/sys/arch/sparc/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/sparc/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.15 1999/01/29 16:30:51 drochner Exp $ */
+/* $NetBSD: bus.h,v 1.16 1999/03/23 21:29:05 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -885,9 +885,11 @@
for (; c; c--, o1+=8, o2+=8)
bus_space_write_8(t, h1, o1, bus_space_read_8(t, h2, o2));
}
+
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
+
/*--------------------------------*/
-
/*
* Flags used in various bus DMA methods.
*/
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/sparc64/include/bus.h
--- a/sys/arch/sparc64/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/sparc64/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.9 1999/01/31 11:15:43 drochner Exp $ */
+/* $NetBSD: bus.h,v 1.10 1999/03/23 21:29:05 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -556,6 +556,7 @@
bus_space_write_8(t, h1, o1, bus_space_read_4(t, h2, o2)); \
} while (0)
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
/*
* Flags used in various bus DMA methods.
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/vax/include/bus.h
--- a/sys/arch/vax/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/vax/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.3 1998/10/09 06:20:06 matt Exp $ */
+/* $NetBSD: bus.h,v 1.4 1999/03/23 21:29:05 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -89,8 +89,11 @@
} \
(void) 0; \
})
+
+#define BUS_SPACE_ALIGNED_POINTER(p, t) __BUS_SPACE_ALIGNED_ADDRESS(p, t)
#else
#define __BUS_SPACE_ADDRESS_SANITY(p,t,d) (void) 0
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
#endif /* BUS_SPACE_DEBUG */
/*
diff -r 8d8a17760b49 -r 3f2786be7d5c sys/arch/x68k/include/bus.h
--- a/sys/arch/x68k/include/bus.h Tue Mar 23 21:19:58 1999 +0000
+++ b/sys/arch/x68k/include/bus.h Tue Mar 23 21:29:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.2 1999/03/16 16:30:21 minoura Exp $ */
+/* $NetBSD: bus.h,v 1.3 1999/03/23 21:29:06 drochner Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -641,6 +641,7 @@
}
}
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
/*
* DMA segment
Home |
Main Index |
Thread Index |
Old Index