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.
This commit is contained in:
peter 2001-01-29 09:38:39 +00:00
parent 2c6ef92d83
commit b7edc4f4e3
21 changed files with 61 additions and 70 deletions

View File

@ -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 <isa/isavar.h>
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

View File

@ -27,6 +27,8 @@
*
*/
#include "opt_isa.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@ -47,7 +49,6 @@
#include <alpha/isa/isavar.h>
#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,

View File

@ -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 <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
@ -76,7 +75,7 @@
#include <i386/isa/icu.h>
#endif /* APIC_IO */
#if NISA > 0
#ifdef DEV_ISA
#include <isa/isavar.h>
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.

View File

@ -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

View File

@ -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 <ddb/ddb.h>
#include "isa.h"
#include <sys/sysctl.h>
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);

View File

@ -47,6 +47,7 @@
#include "opt_pc98.h"
#endif
#include "opt_reset.h"
#include "opt_isa.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -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;

View File

@ -38,8 +38,7 @@
*/
#include "opt_auto_eoi.h"
#include "isa.h"
#include "opt_isa.h"
#include <sys/param.h>
#include <sys/bus.h>
@ -76,7 +75,7 @@
#endif
#include <i386/isa/icu.h>
#if NISA > 0
#ifdef DEV_ISA
#include <isa/isavar.h>
#endif
#include <i386/isa/intr_machdep.h>
@ -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.

View File

@ -38,8 +38,7 @@
*/
#include "opt_auto_eoi.h"
#include "isa.h"
#include "opt_isa.h"
#include <sys/param.h>
#include <sys/bus.h>
@ -76,7 +75,7 @@
#endif
#include <i386/isa/icu.h>
#if NISA > 0
#ifdef DEV_ISA
#include <isa/isavar.h>
#endif
#include <i386/isa/intr_machdep.h>
@ -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.

View File

@ -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

View File

@ -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

View File

@ -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 <sys/param.h>
#include <sys/systm.h>
@ -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 */

View File

@ -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 <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
@ -76,7 +75,7 @@
#include <i386/isa/icu.h>
#endif /* APIC_IO */
#if NISA > 0
#ifdef DEV_ISA
#include <isa/isavar.h>
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.

View File

@ -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

View File

@ -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 <ddb/ddb.h>
#include "isa.h"
#include <sys/sysctl.h>
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);

View File

@ -47,6 +47,7 @@
#include "opt_pc98.h"
#endif
#include "opt_reset.h"
#include "opt_isa.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -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;

View File

@ -38,8 +38,7 @@
*/
#include "opt_auto_eoi.h"
#include "isa.h"
#include "opt_isa.h"
#include <sys/param.h>
#include <sys/bus.h>
@ -76,7 +75,7 @@
#endif
#include <i386/isa/icu.h>
#if NISA > 0
#ifdef DEV_ISA
#include <isa/isavar.h>
#endif
#include <i386/isa/intr_machdep.h>
@ -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.

View File

@ -38,8 +38,7 @@
*/
#include "opt_auto_eoi.h"
#include "isa.h"
#include "opt_isa.h"
#include <sys/param.h>
#include <sys/bus.h>
@ -76,7 +75,7 @@
#endif
#include <i386/isa/icu.h>
#if NISA > 0
#ifdef DEV_ISA
#include <isa/isavar.h>
#endif
#include <i386/isa/intr_machdep.h>
@ -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.

View File

@ -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 <isa/isavar.h>
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

View File

@ -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 <ddb/ddb.h>
#include "isa.h"
#include <sys/sysctl.h>
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);

View File

@ -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

View File

@ -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