Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Use BUS_SPACE_ALIGNED_POINTER() instead of ALIGNED_P...



details:   https://anonhg.NetBSD.org/src/rev/4309a4b33d28
branches:  trunk
changeset: 467370:4309a4b33d28
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Mar 23 21:41:07 1999 +0000

description:
Use BUS_SPACE_ALIGNED_POINTER() instead of ALIGNED_POINTER() where the pointer
in not just used to access memory but is bassed to bus_space_xxx_n()
methods. For debugging purposes, bus_space can have additional constraints
which will be properly met by BUS_SPACE_ALIGNED_POINTER().

diffstat:

 sys/dev/ic/ne2000.c |  4 ++--
 sys/dev/isa/if_ec.c |  5 +++--
 sys/dev/isa/if_we.c |  5 +++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r 3f2786be7d5c -r 4309a4b33d28 sys/dev/ic/ne2000.c
--- a/sys/dev/ic/ne2000.c       Tue Mar 23 21:29:03 1999 +0000
+++ b/sys/dev/ic/ne2000.c       Tue Mar 23 21:41:07 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ne2000.c,v 1.17 1999/01/18 19:17:00 mjacob Exp $       */
+/*     $NetBSD: ne2000.c,v 1.18 1999/03/23 21:41:07 drochner Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -493,7 +493,7 @@
                                            NE2000_ASIC_DATA,
                                            *(u_int16_t *)savebyte);
                                        leftover = 0;
-                               } else if (ALIGNED_POINTER(data,
+                               } else if (BUS_SPACE_ALIGNED_POINTER(data,
                                           u_int16_t) == 0) {
                                        /*
                                         * Unaligned data; buffer the next
diff -r 3f2786be7d5c -r 4309a4b33d28 sys/dev/isa/if_ec.c
--- a/sys/dev/isa/if_ec.c       Tue Mar 23 21:29:03 1999 +0000
+++ b/sys/dev/isa/if_ec.c       Tue Mar 23 21:41:07 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ec.c,v 1.10 1998/10/27 22:45:13 thorpej Exp $       */
+/*     $NetBSD: if_ec.c,v 1.11 1999/03/23 21:41:08 drochner Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -654,7 +654,8 @@
                                    *(u_int16_t *)savebyte);
                                buf += 2;
                                leftover = 0;
-                       } else if (ALIGNED_POINTER(data, u_int16_t) == 0) {
+                       } else if (BUS_SPACE_ALIGNED_POINTER(data, u_int16_t)
+                                  == 0) {
                                /*
                                 * Unaligned data; buffer the next byte.
                                 */
diff -r 3f2786be7d5c -r 4309a4b33d28 sys/dev/isa/if_we.c
--- a/sys/dev/isa/if_we.c       Tue Mar 23 21:29:03 1999 +0000
+++ b/sys/dev/isa/if_we.c       Tue Mar 23 21:41:07 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_we.c,v 1.13 1999/03/15 20:19:57 thomas Exp $        */
+/*     $NetBSD: if_we.c,v 1.14 1999/03/23 21:41:08 drochner Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -684,7 +684,8 @@
                                    *(u_int16_t *)savebyte);
                                buf += 2;
                                leftover = 0;
-                       } else if (ALIGNED_POINTER(data, u_int16_t) == 0) {
+                       } else if (BUS_SPACE_ALIGNED_POINTER(data, u_int16_t)
+                                  == 0) {
                                /*
                                 * Unaligned dta; buffer the next byte.
                                 */



Home | Main Index | Thread Index | Old Index