From cdb5d9e4156e601b81f16793013bc5cc54255ec7 Mon Sep 17 00:00:00 2001 From: briggs Date: Mon, 7 Apr 1997 03:23:35 +0000 Subject: [PATCH] Ahem... bus_probe() already exists and does what bus_space_bad_addr() does. Nuke the latter. --- sys/arch/mac68k/dev/if_sn_obio.c | 4 ++-- sys/arch/mac68k/include/bus.h | 4 +--- sys/arch/mac68k/mac68k/machdep.c | 41 ++------------------------------ 3 files changed, 5 insertions(+), 44 deletions(-) diff --git a/sys/arch/mac68k/dev/if_sn_obio.c b/sys/arch/mac68k/dev/if_sn_obio.c index 6d691a87fe7..c3b5551734a 100644 --- a/sys/arch/mac68k/dev/if_sn_obio.c +++ b/sys/arch/mac68k/dev/if_sn_obio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sn_obio.c,v 1.7 1997/04/06 01:02:13 briggs Exp $ */ +/* $OpenBSD: if_sn_obio.c,v 1.8 1997/04/07 03:23:36 briggs Exp $ */ /* * Copyright (C) 1997 Allen Briggs @@ -161,7 +161,7 @@ sn_obio_getaddr(sc) panic("failed to map space to read SONIC address.\n"); } - if (bus_space_bad_addr(sc->sc_regt, bsh, 0, 1)) { + if (bus_probe(sc->sc_regt, bsh, 0, 1)) { bus_space_unmap(sc->sc_regt, bsh, NBPG); return -1; } diff --git a/sys/arch/mac68k/include/bus.h b/sys/arch/mac68k/include/bus.h index 0ae55d75867..a643949b672 100644 --- a/sys/arch/mac68k/include/bus.h +++ b/sys/arch/mac68k/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.2 1997/04/05 16:22:06 briggs Exp $ */ +/* $OpenBSD: bus.h,v 1.3 1997/04/07 03:23:37 briggs Exp $ */ /* $NetBSD: bus.h,v 1.6 1997/02/24 05:55:14 scottr Exp $ */ /* @@ -66,8 +66,6 @@ int bus_space_alloc __P((bus_space_tag_t t, bus_addr_t rstart, bus_space_handle_t *bshp)); void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size)); -int bus_space_bad_addr __P((bus_space_tag_t tag, bus_space_handle_t hand, - bus_size_t offset, int byte_size)); /* * u_intN_t bus_space_read_N __P((bus_space_tag_t tag, diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c index 99ee8550463..fac1e81644b 100644 --- a/sys/arch/mac68k/mac68k/machdep.c +++ b/sys/arch/mac68k/mac68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.36 1997/04/05 16:22:07 briggs Exp $ */ +/* $OpenBSD: machdep.c,v 1.37 1997/04/07 03:23:35 briggs Exp $ */ /* $NetBSD: machdep.c,v 1.134 1997/02/14 06:15:30 scottr Exp $ */ /* @@ -883,42 +883,6 @@ int *nofault; int badaddr __P((caddr_t)); -int -bus_space_bad_addr(t, h, o, sz) - bus_space_tag_t t; - bus_space_handle_t h; - bus_size_t o; - int sz; -{ - register int i; - label_t faultbuf; - -#ifdef lint - i = *addr; - if (i) - return (0); -#endif - nofault = (int *) &faultbuf; - if (setjmp((label_t *) nofault)) { - nofault = (int *) 0; - return (1); - } - switch (sz) { - default: - case 1: - i = bus_space_read_1(t, h, o); - break; - case 2: - i = bus_space_read_2(t, h, o); - break; - case 4: - i = bus_space_read_4(t, h, o); - break; - } - nofault = (int *) 0; - return (0); -} - int badaddr(addr) register caddr_t addr; @@ -2603,7 +2567,7 @@ get_mapping(void) nblen[nbnumranges - 1] = -nblen[nbnumranges - 1]; same = 0; } -#if 0 +#if 1 printf("Non-system RAM (nubus, etc.):\n"); for (i = 0; i < nbnumranges; i++) { printf(" Log = 0x%lx, Phys = 0x%lx, Len = 0x%lx (%lu)\n", @@ -2630,7 +2594,6 @@ get_mapping(void) } if (i == nbnumranges) { if (0x60000000 <= videoaddr && videoaddr < 0x70000000) { - printf("Checking for Internal Video "); /* * Kludge for IIvx internal video (60b0 0000). * PB 520 (6000 0000) -- 2.20.1