Index: alpha/alpha/autoconf.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/alpha/autoconf.c,v retrieving revision 1.49 diff -u -r1.49 autoconf.c --- alpha/alpha/autoconf.c 24 Oct 2001 17:42:01 -0000 1.49 +++ alpha/alpha/autoconf.c 31 Jan 2002 14:54:36 -0000 @@ -27,7 +27,6 @@ */ #include "opt_bootp.h" -#include "opt_isa.h" #include "opt_nfs.h" #include "opt_nfsroot.h" @@ -59,15 +58,12 @@ #include static void configure __P((void *)); -SYSINIT(configure, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL) +static void configure_finish __P((void *)); +static void configure_start __P((void *)); -static void configure_finish __P((void)); -static void configure_start __P((void)); - -#ifdef DEV_ISA -#include -device_t isa_bus_device = 0; -#endif +SYSINIT(configure1, SI_SUB_CONFIGURE, SI_ORDER_FIRST, configure_start, NULL) +SYSINIT(configure2, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL) +SYSINIT(configure4, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_finish, NULL) extern int nfs_diskless_valid; /* XXX use include file */ @@ -75,13 +71,21 @@ dev_t dumpdev = NODEV; static void -configure_start() +configure_start(void * dummy) { } static void -configure_finish() +configure_finish(void *dummy) { + /* + * Now we're ready to handle (pending) interrupts. + * XXX this is slightly misplaced. + */ + alpha_pal_swpipl(ALPHA_PSL_IPL_0); + + cold = 0; + } #if 0 @@ -175,33 +179,11 @@ static void configure(void *dummy) { - configure_start(); - device_add_child(root_bus, platform.iobus, 0); root_bus_configure(); - if((hwrpb->rpb_type != ST_DEC_3000_300) && - (hwrpb->rpb_type != ST_DEC_3000_500)){ - /* - * Probe ISA devices after everything. - */ -#ifdef DEV_ISA - if (isa_bus_device) - isa_probe_children(isa_bus_device); -#endif - } - configure_finish(); - - /* - * Now we're ready to handle (pending) interrupts. - * XXX this is slightly misplaced. - */ - alpha_pal_swpipl(ALPHA_PSL_IPL_0); - - cold = 0; } - /* * Do legacy root filesystem discovery. This isn't really * needed on the Alpha, which has always used the loader. Index: alpha/isa/isa.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/isa/isa.c,v retrieving revision 1.29 diff -u -r1.29 isa.c --- alpha/isa/isa.c 8 Feb 2002 18:30:36 -0000 1.29 +++ alpha/isa/isa.c 27 Feb 2002 11:22:43 -0000 @@ -403,3 +403,17 @@ return 0; } + + +extern device_t isa_bus_device; +SYSINIT(configurepreisa, SI_SUB_CONFIGURE, SI_ORDER_CONFIG_ISA-1, configure_preisa, NULL) + +static void +configure_preisa(void *dummy) +{ + if(hwrpb->rpb_type == ST_DEC_3000_300 || + hwrpb->rpb_type == ST_DEC_3000_500){ + /*Don't probe device on isa in those machine*/ + isa_bus_device = NULL; + } +} Index: i386/i386/autoconf.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/autoconf.c,v retrieving revision 1.160 diff -u -r1.160 autoconf.c --- i386/i386/autoconf.c 10 Dec 2001 20:02:21 -0000 1.160 +++ i386/i386/autoconf.c 27 Feb 2002 11:20:56 -0000 @@ -46,7 +46,6 @@ * and the drivers are initialized. */ #include "opt_bootp.h" -#include "opt_isa.h" #include "opt_nfs.h" #include "opt_nfsroot.h" #include "opt_bus.h" @@ -85,16 +84,10 @@ #include #endif /* APIC_IO */ -#ifdef DEV_ISA -#include - -device_t isa_bus_device = 0; -#endif - static void configure_first __P((void *)); static void configure __P((void *)); +static void configure_intr(void *); static void configure_final __P((void *)); - #if defined(NFSCLIENT) && defined(NFS_ROOT) static void pxe_setup_nfsdiskless(void); #endif @@ -102,6 +95,7 @@ SYSINIT(configure1, SI_SUB_CONFIGURE, SI_ORDER_FIRST, configure_first, NULL); /* SI_ORDER_SECOND is hookable */ SYSINIT(configure2, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL); +/* If ISA exists, attach will done at SI_ORDER_CONFIG_ISA */ /* SI_ORDER_MIDDLE is hookable */ SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL); @@ -153,21 +147,6 @@ /* initialize new bus architecture */ root_bus_configure(); - -#ifdef DEV_ISA - /* - * Explicitly probe and attach ISA last. The isa bus saves - * it's device node at attach time for us here. - */ - if (isa_bus_device) - isa_probe_children(isa_bus_device); -#endif - - /* - * Now we're ready to handle (pending) interrupts. - * XXX this is slightly misplaced. - */ - spl0(); } static void @@ -176,6 +155,7 @@ { int i; + spl0(); cninit_finish(); if (bootverbose) { Index: isa/isa_common.c =================================================================== RCS file: /home/ncvs/src/sys/isa/isa_common.c,v retrieving revision 1.29 diff -u -r1.29 isa_common.c --- isa/isa_common.c 24 Feb 2002 23:24:01 -0000 1.29 +++ isa/isa_common.c 27 Feb 2002 03:43:08 -0000 @@ -67,6 +67,7 @@ #include #include #include +#include #include @@ -95,8 +96,9 @@ isa_init(dev); /* Allow machdep code to initialise */ return 0; } - -extern device_t isa_bus_device; +device_t isa_bus_device; +static void isa_probe_children(void *data); +SYSINIT(configureisa, SI_SUB_CONFIGURE, SI_ORDER_CONFIG_ISA, isa_probe_children, &isa_bus_device); static int isa_attach(device_t dev) @@ -524,12 +526,18 @@ /* * Called after other devices have initialised to probe for isa devices. */ -void -isa_probe_children(device_t dev) +static void +isa_probe_children(void *data) { device_t *children; + device_t dev = (device_t *) data; struct isa_config *cfg; int nchildren, i; + + /*Disabled, do nothing*/ + if(dev == NULL){ + return; + } /* * Create all the children by calling driver's identify methods. Index: isa/isavar.h =================================================================== RCS file: /home/ncvs/src/sys/isa/isavar.h,v retrieving revision 1.22 diff -u -r1.22 isavar.h --- isa/isavar.h 5 Sep 2001 03:54:28 -0000 1.22 +++ isa/isavar.h 27 Feb 2002 06:16:20 -0000 @@ -37,6 +37,8 @@ #include #ifdef _KERNEL +/*kernel sysinit sub value for autoconf with ISA specific*/ +#define SI_ORDER_CONFIG_ISA 0x0100000 /* * ISA devices are partially ordered to ensure that devices which are @@ -165,7 +167,6 @@ ISA_ACCESSOR(configattr, CONFIGATTR, int) extern intrmask_t isa_irq_pending(void); -extern void isa_probe_children(device_t dev); extern void isa_dmacascade __P((int chan)); extern void isa_dmadone __P((int flags, caddr_t addr, int nbytes, int chan)); Index: ia64/ia64/autoconf.c =================================================================== RCS file: /home/ncvs/src/sys/ia64/ia64/autoconf.c,v retrieving revision 1.8 diff -u -r1.8 autoconf.c --- ia64/ia64/autoconf.c 24 Oct 2001 08:06:55 -0000 1.8 +++ ia64/ia64/autoconf.c 27 Feb 2002 05:01:53 -0000 @@ -27,7 +27,6 @@ */ #include "opt_bootp.h" -#include "opt_isa.h" #include "opt_nfs.h" #include "opt_nfsroot.h" @@ -54,13 +53,10 @@ #include #include +static void configure_final __P((void *)); static void configure __P((void *)); -SYSINIT(configure, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL) - -#ifdef DEV_ISA -#include -device_t isa_bus_device = 0; -#endif +SYSINIT(configure, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL); +SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL); extern int nfs_diskless_valid; /* XXX use include file */ @@ -77,14 +73,11 @@ root_bus_configure(); - /* - * Probe ISA devices after everything. - */ -#ifdef DEV_ISA - if (isa_bus_device) - isa_probe_children(isa_bus_device); -#endif +} +static void +configure_final(void *dummy) +{ /* * Now we're ready to handle (pending) interrupts. * XXX this is slightly misplaced.