Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Remove cargo-culted '#if 0' code that was designed ...



details:   https://anonhg.NetBSD.org/src/rev/2ab2406b1e94
branches:  trunk
changeset: 980088:2ab2406b1e94
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 23 19:38:07 2021 +0000

description:
Remove cargo-culted '#if 0' code that was designed to produce a
compile-time error if any of the bus_space_*_8 functions was used,
but was documented that it produces a link-time error.

diffstat:

 sys/arch/emips/include/bus.h         |  43 +----------------------------
 sys/arch/evbcf/include/bus_space.h   |  44 +----------------------------
 sys/arch/hp300/include/bus.h         |  42 +---------------------------
 sys/arch/luna68k/include/bus.h       |  42 +---------------------------
 sys/arch/mac68k/include/bus.h        |  54 +-----------------------------------
 sys/arch/mvme68k/include/bus_space.h |  44 +----------------------------
 sys/arch/news68k/include/bus.h       |  42 +---------------------------
 sys/arch/newsmips/include/bus.h      |  43 +----------------------------
 sys/arch/next68k/include/bus_space.h |  42 +---------------------------
 sys/arch/vax/include/bus.h           |  41 +--------------------------
 10 files changed, 10 insertions(+), 427 deletions(-)

diffs (truncated from 1137 to 300 lines):

diff -r 2346d6ebea6a -r 2ab2406b1e94 sys/arch/emips/include/bus.h
--- a/sys/arch/emips/include/bus.h      Sat Jan 23 19:03:55 2021 +0000
+++ b/sys/arch/emips/include/bus.h      Sat Jan 23 19:38:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.h,v 1.4 2020/04/02 15:30:26 msaitoh Exp $  */
+/*     $NetBSD: bus.h,v 1.5 2021/01/23 19:38:07 christos Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -143,10 +143,6 @@
 #define        bus_space_read_4(t, h, o)                                       \
      ((void) t, (*(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 !!!
-#endif
-
 /*
  *     void bus_space_read_multi_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset,
@@ -178,10 +174,6 @@
 __EMIPS_bus_space_read_multi(2,16)
 __EMIPS_bus_space_read_multi(4,32)
 
-#if 0  /* Cause a link error for bus_space_read_multi_8 */
-#define        bus_space_read_multi_8  !!! bus_space_read_multi_8 unimplemented !!!
-#endif
-
 #undef __EMIPS_bus_space_read_multi
 
 /*
@@ -218,10 +210,6 @@
 __EMIPS_bus_space_read_region(2,16)
 __EMIPS_bus_space_read_region(4,32)
 
-#if 0  /* Cause a link error for bus_space_read_region_8 */
-#define        bus_space_read_region_8 !!! bus_space_read_region_8 unimplemented !!!
-#endif
-
 #undef __EMIPS_bus_space_read_region
 
 /*
@@ -254,10 +242,6 @@
        wbflush();                                      /* XXX */       \
 } while (0)
 
-#if 0  /* Cause a link error for bus_space_write_8 */
-#define        bus_space_write_8       !!! bus_space_write_8 not implemented !!!
-#endif
-
 /*
  *     void bus_space_write_multi_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset,
@@ -289,11 +273,6 @@
 __EMIPS_bus_space_write_multi(2,16)
 __EMIPS_bus_space_write_multi(4,32)
 
-#if 0  /* Cause a link error for bus_space_write_8 */
-#define        bus_space_write_multi_8(t, h, o, a, c)                          \
-                       !!! bus_space_write_multi_8 unimplemented !!!
-#endif
-
 #undef __EMIPS_bus_space_write_multi
 
 /*
@@ -329,11 +308,6 @@
 __EMIPS_bus_space_write_region(2,16)
 __EMIPS_bus_space_write_region(4,32)
 
-#if 0  /* Cause a link error for bus_space_write_region_8 */
-#define        bus_space_write_region_8                                        \
-                       !!! bus_space_write_region_8 unimplemented !!!
-#endif
-
 #undef __EMIPS_bus_space_write_region
 
 /*
@@ -367,11 +341,6 @@
 __EMIPS_bus_space_set_multi(2,16)
 __EMIPS_bus_space_set_multi(4,32)
 
-#if 0  /* Cause a link error for bus_space_set_multi_8 */
-#define        bus_space_set_multi_8                                           \
-                       !!! bus_space_set_multi_8 unimplemented !!!
-#endif
-
 #undef __EMIPS_bus_space_set_multi
 
 /*
@@ -407,11 +376,6 @@
 __EMIPS_bus_space_set_region(2,16)
 __EMIPS_bus_space_set_region(4,32)
 
-#if 0  /* Cause a link error for bus_space_set_region_8 */
-#define        bus_space_set_region_8                                          \
-                       !!! bus_space_set_region_8 unimplemented !!!
-#endif
-
 #undef __EMIPS_bus_space_set_region
 
 /*
@@ -459,11 +423,6 @@
 __EMIPS_copy_region(2)
 __EMIPS_copy_region(4)
 
-#if 0  /* Cause a link error for bus_space_copy_region_8 */
-#define        bus_space_copy_region_8                                         \
-                       !!! bus_space_copy_region_8 unimplemented !!!
-#endif
-
 #undef __EMIPS_copy_region
 
 /*
diff -r 2346d6ebea6a -r 2ab2406b1e94 sys/arch/evbcf/include/bus_space.h
--- a/sys/arch/evbcf/include/bus_space.h        Sat Jan 23 19:03:55 2021 +0000
+++ b/sys/arch/evbcf/include/bus_space.h        Sat Jan 23 19:38:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_space.h,v 1.4 2020/04/02 15:30:26 msaitoh Exp $ */
+/*     $NetBSD: bus_space.h,v 1.5 2021/01/23 19:38:07 christos Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -171,11 +171,6 @@
 #define        bus_space_peek_4(t, h, o, vp)                                   \
     (*((t)->bs_peek_4))((t)->bs_cookie, (h), (o), (vp))
 
-#if 0  /* Cause a link error for bus_space_peek_8 */
-#define        bus_space_peek_8(t, h, o, vp)                                   \
-    (*((t)->bs_peek_8))((t)->bs_cookie, (h), (o), (vp))
-#endif
-
 /*
  *     int bus_space_poke_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset, uintN_t value);
@@ -194,11 +189,6 @@
 #define        bus_space_poke_4(t, h, o, v)                                    \
     (*((t)->bs_poke_4))((t)->bs_cookie, (h), (o), (v))
 
-#if 0  /* Cause a link error for bus_space_poke_8 */
-#define        bus_space_poke_8(t, h, o, v)                                    \
-    (*((t)->bs_poke_8))((t)->bs_cookie, (h), (o), (v))
-#endif
-
 /*
  *     uintN_t bus_space_read_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset);
@@ -264,10 +254,6 @@
                    "a0","a1","d0");                                    \
 } while (0);
 
-#if 0  /* Cause a link error for bus_space_read_multi_8 */
-#define        bus_space_read_multi_8  !!! bus_space_read_multi_8 unimplemented !!!
-#endif
-
 /*
  *     void bus_space_read_region_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset,
@@ -320,10 +306,6 @@
                    "a0","a1","d0");                                    \
 } while (0);
 
-#if 0  /* Cause a link error for bus_space_read_region_8 */
-#define        bus_space_read_region_8 !!! bus_space_read_region_8 unimplemented !!!
-#endif
-
 /*
  *     void bus_space_write_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset,
@@ -396,11 +378,6 @@
                    "a0","a1","d0");                                    \
 } while (0);
 
-#if 0  /* Cause a link error for bus_space_write_8 */
-#define        bus_space_write_multi_8(t, h, o, a, c)                          \
-                       !!! bus_space_write_multi_8 unimplemented !!!
-#endif
-
 /*
  *     void bus_space_write_region_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset,
@@ -452,11 +429,6 @@
                    "a0","a1","d0");                                    \
 } while (0);
 
-#if 0  /* Cause a link error for bus_space_write_region_8 */
-#define        bus_space_write_region_8                                        \
-                       !!! bus_space_write_region_8 unimplemented !!!
-#endif
-
 /*
  *     void bus_space_set_multi_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset, uintN_t val,
@@ -508,11 +480,6 @@
                    "a0","d0","d1");                                    \
 } while (0);
 
-#if 0  /* Cause a link error for bus_space_set_multi_8 */
-#define        bus_space_set_multi_8                                           \
-                       !!! bus_space_set_multi_8 unimplemented !!!
-#endif
-
 /*
  *     void bus_space_set_region_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset, uintN_t val,
@@ -564,11 +531,6 @@
                    "a0","d0","d1");                                    \
 } while (0);
 
-#if 0  /* Cause a link error for bus_space_set_region_8 */
-#define        bus_space_set_region_8                                          \
-                       !!! bus_space_set_region_8 unimplemented !!!
-#endif
-
 /*
  *     void bus_space_copy_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh1, bus_size_t off1,
@@ -612,10 +574,6 @@
 __COLDFIRE_copy_region_N(1)
 __COLDFIRE_copy_region_N(2)
 __COLDFIRE_copy_region_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 __COLDFIRE_copy_region_N
 
diff -r 2346d6ebea6a -r 2ab2406b1e94 sys/arch/hp300/include/bus.h
--- a/sys/arch/hp300/include/bus.h      Sat Jan 23 19:03:55 2021 +0000
+++ b/sys/arch/hp300/include/bus.h      Sat Jan 23 19:38:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.h,v 1.20 2020/04/02 15:30:26 msaitoh Exp $ */
+/*     $NetBSD: bus.h,v 1.21 2021/01/23 19:38:07 christos Exp $        */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -243,10 +243,6 @@
     (((t)->bsr4 != NULL) ? ((t)->bsr4)(t, h, o) :                      \
     (*(volatile uint32_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 !!!
-#endif
-
 /*
  *     void bus_space_read_multi_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset,
@@ -309,10 +305,6 @@
        }                                                               \
 } while (/* CONSTCOND */ 0)
 
-#if 0  /* Cause a link error for bus_space_read_multi_8 */
-#define        bus_space_read_multi_8  !!! bus_space_read_multi_8 unimplemented !!!
-#endif
-
 /*
  *     void bus_space_read_region_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset,
@@ -377,10 +369,6 @@
        }                                                               \
 } while (/* CONSTCOND */ 0)
 
-#if 0  /* Cause a link error for bus_space_read_region_8 */
-#define        bus_space_read_region_8 !!! bus_space_read_region_8 unimplemented !!!
-#endif
-
 /*
  *     void bus_space_write_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset,
@@ -414,10 +402,6 @@
                ((void)(*(volatile uint32_t *)((h) + (o)) = (v)));      \
 } while (/* CONSTCOND */ 0)
 
-#if 0  /* Cause a link error for bus_space_write_8 */
-#define        bus_space_write_8       !!! bus_space_write_8 not implemented !!!
-#endif
-
 /*
  *     void bus_space_write_multi_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset,
@@ -482,11 +466,6 @@
        }                                                               \
 } while (/* CONSTCOND */ 0)
 
-#if 0  /* Cause a link error for bus_space_write_8 */
-#define        bus_space_write_multi_8(t, h, o, a, c)                          \
-                       !!! bus_space_write_multi_8 unimplemented !!!
-#endif
-
 /*
  *     void bus_space_write_region_N(bus_space_tag_t tag,
  *         bus_space_handle_t bsh, bus_size_t offset,
@@ -550,11 +529,6 @@
        }                                                               \
 } while (/* CONSTCOND */ 0)
 
-#if 0  /* Cause a link error for bus_space_write_region_8 */
-#define        bus_space_write_region_8                                        \
-                       !!! bus_space_write_region_8 unimplemented !!!
-#endif



Home | Main Index | Thread Index | Old Index