From b7edc4f4e3e8a67e435d794319102a67c59af546 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 29 Jan 2001 09:38:39 +0000 Subject: [PATCH] Send "#if NISA > 0" to the bit-bucket and replace it with an option. These were compile-time "is the isa code present?" tests and not 'how many isa busses' tests. --- sys/alpha/alpha/autoconf.c | 6 +++--- sys/alpha/pci/pcibus.c | 11 ++++++----- sys/amd64/amd64/autoconf.c | 7 +++---- sys/amd64/amd64/machdep.c | 4 ++-- sys/amd64/amd64/trap.c | 11 +++++------ sys/amd64/amd64/vm_machdep.c | 5 ++--- sys/amd64/isa/intr_machdep.c | 7 +++---- sys/amd64/isa/nmi.c | 7 +++---- sys/conf/files | 2 +- sys/conf/options | 1 + sys/dev/ata/ata-all.c | 4 ++-- sys/i386/i386/autoconf.c | 7 +++---- sys/i386/i386/machdep.c | 4 ++-- sys/i386/i386/trap.c | 11 +++++------ sys/i386/i386/vm_machdep.c | 5 ++--- sys/i386/isa/intr_machdep.c | 7 +++---- sys/i386/isa/nmi.c | 7 +++---- sys/ia64/ia64/autoconf.c | 6 +++--- sys/kern/subr_trap.c | 11 +++++------ sys/pc98/i386/machdep.c | 4 ++-- sys/pc98/pc98/machdep.c | 4 ++-- 21 files changed, 61 insertions(+), 70 deletions(-) diff --git a/sys/alpha/alpha/autoconf.c b/sys/alpha/alpha/autoconf.c index a875d54e1717..2bacd25b6bca 100644 --- a/sys/alpha/alpha/autoconf.c +++ b/sys/alpha/alpha/autoconf.c @@ -29,6 +29,7 @@ #include "opt_bootp.h" #include "opt_ffs.h" #include "opt_cd9660.h" +#include "opt_isa.h" #include "opt_nfs.h" #include "opt_nfsroot.h" @@ -64,8 +65,7 @@ SYSINIT(configure, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL) static void configure_finish __P((void)); static void configure_start __P((void)); -#include "isa.h" -#if NISA > 0 +#ifdef DEV_ISA #include device_t isa_bus_device = 0; #endif @@ -187,7 +187,7 @@ configure(void *dummy) /* * Probe ISA devices after everything. */ -#if NISA > 0 +#ifdef DEV_ISA if (isa_bus_device) isa_probe_children(isa_bus_device); #endif diff --git a/sys/alpha/pci/pcibus.c b/sys/alpha/pci/pcibus.c index aea4a8849e50..71a3eb15954d 100644 --- a/sys/alpha/pci/pcibus.c +++ b/sys/alpha/pci/pcibus.c @@ -27,6 +27,8 @@ * */ +#include "opt_isa.h" + #include #include #include @@ -47,7 +49,6 @@ #include #include "alphapci_if.h" -#include "isa.h" #define ISA_IRQ_OFFSET 0xe0 #define ISA_IRQ_LEN 0x10 @@ -90,7 +91,7 @@ alpha_pci_route_interrupt(device_t bus, device_t dev, int pin) return(255); } -#if NISA > 0 +#ifdef DEV_ISA struct resource * alpha_platform_alloc_ide_intr(int chan) { @@ -153,7 +154,7 @@ alpha_platform_pci_setup_intr(device_t dev, device_t child, driver_intr_t *intr, void *arg, void **cookiep) { -#if NISA > 0 +#ifdef DEV_ISA /* * XXX - If we aren't the resource manager for this IRQ, assume that * it is actually handled by the ISA PIC. @@ -171,7 +172,7 @@ int alpha_platform_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie) { -#if NISA > 0 +#ifdef DEV_ISA /* * XXX - If we aren't the resource manager for this IRQ, assume that * it is actually handled by the ISA PIC. @@ -225,7 +226,7 @@ pci_alloc_resource(device_t bus, device_t child, int type, int *rid, switch (type) { case SYS_RES_IRQ: -#if NISA > 0 +#ifdef DEV_ISA if((start >= ISA_IRQ_OFFSET) && (end < ISA_IRQ_OFFSET + ISA_IRQ_LEN)) { return isa_alloc_intrs(bus, child, diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c index 8e41c8267bbe..eb8eb8dd9712 100644 --- a/sys/amd64/amd64/autoconf.c +++ b/sys/amd64/amd64/autoconf.c @@ -48,13 +48,12 @@ #include "opt_bootp.h" #include "opt_ffs.h" #include "opt_cd9660.h" +#include "opt_isa.h" #include "opt_nfs.h" #include "opt_nfsroot.h" #include "opt_bus.h" #include "opt_rootdevname.h" -#include "isa.h" - #include #include #include @@ -76,7 +75,7 @@ #include #endif /* APIC_IO */ -#if NISA > 0 +#ifdef DEV_ISA #include device_t isa_bus_device = 0; @@ -145,7 +144,7 @@ configure(dummy) /* initialize new bus architecture */ root_bus_configure(); -#if NISA > 0 +#ifdef DEV_ISA /* * Explicitly probe and attach ISA last. The isa bus saves * it's device node at attach time for us here. diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 74917e776a4d..e03d64ff7f10 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -44,6 +44,7 @@ #include "opt_ddb.h" #include "opt_inet.h" #include "opt_ipx.h" +#include "opt_isa.h" #include "opt_maxmem.h" #include "opt_msgbuf.h" #include "opt_npx.h" @@ -1979,8 +1980,7 @@ init386(first) */ cninit(); -#include "isa.h" -#if NISA >0 +#ifdef DEV_ISA isa_defaultirq(); #endif diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 599551b25bc5..2caa992ab7e6 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -45,6 +45,7 @@ #include "opt_clock.h" #include "opt_cpu.h" #include "opt_ddb.h" +#include "opt_isa.h" #include "opt_ktrace.h" #include "opt_npx.h" #include "opt_trap.h" @@ -98,8 +99,6 @@ #include -#include "isa.h" - #include int (*pmath_emulate) __P((struct trapframe *)); @@ -365,7 +364,7 @@ trap(frame) i = SIGFPE; break; -#if NISA > 0 +#ifdef DEV_ISA case T_NMI: #ifdef POWERFAIL_NMI #ifndef TIMER_FREQ @@ -398,7 +397,7 @@ trap(frame) panic("NMI indicates hardware failure"); break; #endif /* POWERFAIL_NMI */ -#endif /* NISA > 0 */ +#endif /* DEV_ISA */ case T_OFLOW: /* integer overflow fault */ ucode = FPE_INTOVF; @@ -618,7 +617,7 @@ trap(frame) #endif break; -#if NISA > 0 +#ifdef DEV_ISA case T_NMI: #ifdef POWERFAIL_NMI mtx_enter(&Giant, MTX_DEF); @@ -648,7 +647,7 @@ trap(frame) goto out; /* FALL THROUGH */ #endif /* POWERFAIL_NMI */ -#endif /* NISA > 0 */ +#endif /* DEV_ISA */ } mtx_enter(&Giant, MTX_DEF); diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 232ac424d5a6..eddae55af86e 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -47,6 +47,7 @@ #include "opt_pc98.h" #endif #include "opt_reset.h" +#include "opt_isa.h" #include #include @@ -619,14 +620,12 @@ swi_vm(void *dummy) * or other unpredictable behaviour. */ -#include "isa.h" - int is_physical_memory(addr) vm_offset_t addr; { -#if NISA > 0 +#ifdef DEV_ISA /* The ISA ``memory hole''. */ if (addr >= 0xa0000 && addr < 0x100000) return 0; diff --git a/sys/amd64/isa/intr_machdep.c b/sys/amd64/isa/intr_machdep.c index 2649022436c9..7a109124d262 100644 --- a/sys/amd64/isa/intr_machdep.c +++ b/sys/amd64/isa/intr_machdep.c @@ -38,8 +38,7 @@ */ #include "opt_auto_eoi.h" - -#include "isa.h" +#include "opt_isa.h" #include #include @@ -76,7 +75,7 @@ #endif #include -#if NISA > 0 +#ifdef DEV_ISA #include #endif #include @@ -367,7 +366,7 @@ isa_strayintr(vcookiep) "too many stray irq %d's; not logging any more\n", intr); } -#if NISA > 0 +#ifdef DEV_ISA /* * Return a bitmap of the current interrupt requests. This is 8259-specific * and is only suitable for use at probe time. diff --git a/sys/amd64/isa/nmi.c b/sys/amd64/isa/nmi.c index 2649022436c9..7a109124d262 100644 --- a/sys/amd64/isa/nmi.c +++ b/sys/amd64/isa/nmi.c @@ -38,8 +38,7 @@ */ #include "opt_auto_eoi.h" - -#include "isa.h" +#include "opt_isa.h" #include #include @@ -76,7 +75,7 @@ #endif #include -#if NISA > 0 +#ifdef DEV_ISA #include #endif #include @@ -367,7 +366,7 @@ isa_strayintr(vcookiep) "too many stray irq %d's; not logging any more\n", intr); } -#if NISA > 0 +#ifdef DEV_ISA /* * Return a bitmap of the current interrupt requests. This is 8259-specific * and is only suitable for use at probe time. diff --git a/sys/conf/files b/sys/conf/files index 7ab8e2083bda..0fdbe4cef228 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -601,7 +601,7 @@ i4b/layer4/i4b_l4mgmt.c optional i4b i4b/layer4/i4b_l4timer.c optional i4b # isa/isa_if.m optional isa -isa/isa_common.c count isa +isa/isa_common.c optional isa isa/isahint.c optional isa isa/joy.c optional joy isa/pnp.c optional isa diff --git a/sys/conf/options b/sys/conf/options index 1a31babf0347..af104ee2e9dc 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -428,6 +428,7 @@ COM_ESP opt_sio.h COM_MULTIPORT opt_sio.h BREAK_TO_DEBUGGER opt_comconsole.h ALT_BREAK_TO_DEBUGGER opt_comconsole.h +DEV_ISA opt_isa.h # Include tweaks for running under the SimOS machine simulator. SIMOS opt_simos.h diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 9dec51c5adc3..17f1de989873 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -29,7 +29,6 @@ */ #include "ata.h" -#include "isa.h" #include "card.h" #include "pci.h" #include "atadisk.h" @@ -37,6 +36,7 @@ #include "atapifd.h" #include "atapist.h" #include "opt_global.h" +#include "opt_isa.h" #include "opt_ata.h" #include #include @@ -98,7 +98,7 @@ static struct intr_config_hook *ata_delayed_attach = NULL; static char ata_conf[256]; static MALLOC_DEFINE(M_ATA, "ATA generic", "ATA driver generic layer"); -#if NISA > 0 +#ifdef DEV_ISA static struct isa_pnp_id ata_ids[] = { {0x0006d041, "Generic ESDI/IDE/ATA controller"}, /* PNP0600 */ {0x0106d041, "Plus Hardcard II"}, /* PNP0601 */ diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c index 8e41c8267bbe..eb8eb8dd9712 100644 --- a/sys/i386/i386/autoconf.c +++ b/sys/i386/i386/autoconf.c @@ -48,13 +48,12 @@ #include "opt_bootp.h" #include "opt_ffs.h" #include "opt_cd9660.h" +#include "opt_isa.h" #include "opt_nfs.h" #include "opt_nfsroot.h" #include "opt_bus.h" #include "opt_rootdevname.h" -#include "isa.h" - #include #include #include @@ -76,7 +75,7 @@ #include #endif /* APIC_IO */ -#if NISA > 0 +#ifdef DEV_ISA #include device_t isa_bus_device = 0; @@ -145,7 +144,7 @@ configure(dummy) /* initialize new bus architecture */ root_bus_configure(); -#if NISA > 0 +#ifdef DEV_ISA /* * Explicitly probe and attach ISA last. The isa bus saves * it's device node at attach time for us here. diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 74917e776a4d..e03d64ff7f10 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -44,6 +44,7 @@ #include "opt_ddb.h" #include "opt_inet.h" #include "opt_ipx.h" +#include "opt_isa.h" #include "opt_maxmem.h" #include "opt_msgbuf.h" #include "opt_npx.h" @@ -1979,8 +1980,7 @@ init386(first) */ cninit(); -#include "isa.h" -#if NISA >0 +#ifdef DEV_ISA isa_defaultirq(); #endif diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 599551b25bc5..2caa992ab7e6 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -45,6 +45,7 @@ #include "opt_clock.h" #include "opt_cpu.h" #include "opt_ddb.h" +#include "opt_isa.h" #include "opt_ktrace.h" #include "opt_npx.h" #include "opt_trap.h" @@ -98,8 +99,6 @@ #include -#include "isa.h" - #include int (*pmath_emulate) __P((struct trapframe *)); @@ -365,7 +364,7 @@ trap(frame) i = SIGFPE; break; -#if NISA > 0 +#ifdef DEV_ISA case T_NMI: #ifdef POWERFAIL_NMI #ifndef TIMER_FREQ @@ -398,7 +397,7 @@ trap(frame) panic("NMI indicates hardware failure"); break; #endif /* POWERFAIL_NMI */ -#endif /* NISA > 0 */ +#endif /* DEV_ISA */ case T_OFLOW: /* integer overflow fault */ ucode = FPE_INTOVF; @@ -618,7 +617,7 @@ trap(frame) #endif break; -#if NISA > 0 +#ifdef DEV_ISA case T_NMI: #ifdef POWERFAIL_NMI mtx_enter(&Giant, MTX_DEF); @@ -648,7 +647,7 @@ trap(frame) goto out; /* FALL THROUGH */ #endif /* POWERFAIL_NMI */ -#endif /* NISA > 0 */ +#endif /* DEV_ISA */ } mtx_enter(&Giant, MTX_DEF); diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 232ac424d5a6..eddae55af86e 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -47,6 +47,7 @@ #include "opt_pc98.h" #endif #include "opt_reset.h" +#include "opt_isa.h" #include #include @@ -619,14 +620,12 @@ swi_vm(void *dummy) * or other unpredictable behaviour. */ -#include "isa.h" - int is_physical_memory(addr) vm_offset_t addr; { -#if NISA > 0 +#ifdef DEV_ISA /* The ISA ``memory hole''. */ if (addr >= 0xa0000 && addr < 0x100000) return 0; diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c index 2649022436c9..7a109124d262 100644 --- a/sys/i386/isa/intr_machdep.c +++ b/sys/i386/isa/intr_machdep.c @@ -38,8 +38,7 @@ */ #include "opt_auto_eoi.h" - -#include "isa.h" +#include "opt_isa.h" #include #include @@ -76,7 +75,7 @@ #endif #include -#if NISA > 0 +#ifdef DEV_ISA #include #endif #include @@ -367,7 +366,7 @@ isa_strayintr(vcookiep) "too many stray irq %d's; not logging any more\n", intr); } -#if NISA > 0 +#ifdef DEV_ISA /* * Return a bitmap of the current interrupt requests. This is 8259-specific * and is only suitable for use at probe time. diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c index 2649022436c9..7a109124d262 100644 --- a/sys/i386/isa/nmi.c +++ b/sys/i386/isa/nmi.c @@ -38,8 +38,7 @@ */ #include "opt_auto_eoi.h" - -#include "isa.h" +#include "opt_isa.h" #include #include @@ -76,7 +75,7 @@ #endif #include -#if NISA > 0 +#ifdef DEV_ISA #include #endif #include @@ -367,7 +366,7 @@ isa_strayintr(vcookiep) "too many stray irq %d's; not logging any more\n", intr); } -#if NISA > 0 +#ifdef DEV_ISA /* * Return a bitmap of the current interrupt requests. This is 8259-specific * and is only suitable for use at probe time. diff --git a/sys/ia64/ia64/autoconf.c b/sys/ia64/ia64/autoconf.c index 59edff84eed8..fb5578d6cd9e 100644 --- a/sys/ia64/ia64/autoconf.c +++ b/sys/ia64/ia64/autoconf.c @@ -29,6 +29,7 @@ #include "opt_bootp.h" #include "opt_ffs.h" #include "opt_cd9660.h" +#include "opt_isa.h" #include "opt_nfs.h" #include "opt_nfsroot.h" @@ -59,8 +60,7 @@ static void configure __P((void *)); SYSINIT(configure, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL) -#include "isa.h" -#if NISA > 0 +#ifdef DEV_ISA #include device_t isa_bus_device = 0; #endif @@ -83,7 +83,7 @@ configure(void *dummy) /* * Probe ISA devices after everything. */ -#if NISA > 0 +#ifdef DEV_ISA if (isa_bus_device) isa_probe_children(isa_bus_device); #endif diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 599551b25bc5..2caa992ab7e6 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -45,6 +45,7 @@ #include "opt_clock.h" #include "opt_cpu.h" #include "opt_ddb.h" +#include "opt_isa.h" #include "opt_ktrace.h" #include "opt_npx.h" #include "opt_trap.h" @@ -98,8 +99,6 @@ #include -#include "isa.h" - #include int (*pmath_emulate) __P((struct trapframe *)); @@ -365,7 +364,7 @@ trap(frame) i = SIGFPE; break; -#if NISA > 0 +#ifdef DEV_ISA case T_NMI: #ifdef POWERFAIL_NMI #ifndef TIMER_FREQ @@ -398,7 +397,7 @@ trap(frame) panic("NMI indicates hardware failure"); break; #endif /* POWERFAIL_NMI */ -#endif /* NISA > 0 */ +#endif /* DEV_ISA */ case T_OFLOW: /* integer overflow fault */ ucode = FPE_INTOVF; @@ -618,7 +617,7 @@ trap(frame) #endif break; -#if NISA > 0 +#ifdef DEV_ISA case T_NMI: #ifdef POWERFAIL_NMI mtx_enter(&Giant, MTX_DEF); @@ -648,7 +647,7 @@ trap(frame) goto out; /* FALL THROUGH */ #endif /* POWERFAIL_NMI */ -#endif /* NISA > 0 */ +#endif /* DEV_ISA */ } mtx_enter(&Giant, MTX_DEF); diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index be66264ce7e1..a1688eb85321 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -44,6 +44,7 @@ #include "opt_ddb.h" #include "opt_inet.h" #include "opt_ipx.h" +#include "opt_isa.h" #include "opt_maxmem.h" #include "opt_msgbuf.h" #include "opt_npx.h" @@ -2288,8 +2289,7 @@ init386(first) */ cninit(); -#include "isa.h" -#if NISA >0 +#ifdef DEV_ISA isa_defaultirq(); #endif diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index be66264ce7e1..a1688eb85321 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -44,6 +44,7 @@ #include "opt_ddb.h" #include "opt_inet.h" #include "opt_ipx.h" +#include "opt_isa.h" #include "opt_maxmem.h" #include "opt_msgbuf.h" #include "opt_npx.h" @@ -2288,8 +2289,7 @@ init386(first) */ cninit(); -#include "isa.h" -#if NISA >0 +#ifdef DEV_ISA isa_defaultirq(); #endif