Split configure() into 3 separate steps like we do on other
architectures. This makes it possible to insert hooks before and after the device attachment step. Tested thanks to: marcel
This commit is contained in:
parent
a7b1b2b6ca
commit
60719a1a44
@ -54,27 +54,21 @@ __FBSDID("$FreeBSD$");
|
||||
#include <cam/cam_xpt_sim.h>
|
||||
#include <cam/cam_debug.h>
|
||||
|
||||
static void configure_first(void *);
|
||||
static void configure(void *);
|
||||
SYSINIT(configure, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL)
|
||||
static void configure_final(void *);
|
||||
|
||||
static void configure_finish(void);
|
||||
static void configure_start(void);
|
||||
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);
|
||||
/* SI_ORDER_MIDDLE is hookable */
|
||||
SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL);
|
||||
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
device_t isa_bus_device = 0;
|
||||
#endif
|
||||
|
||||
static void
|
||||
configure_start()
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
configure_finish()
|
||||
{
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
static int
|
||||
@ -163,10 +157,14 @@ bootdev_ctrl_dev_type(void)
|
||||
/*
|
||||
* Determine i/o configuration for a machine.
|
||||
*/
|
||||
static void
|
||||
configure_first(void *dummy)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
configure(void *dummy)
|
||||
{
|
||||
configure_start();
|
||||
|
||||
device_add_child(root_bus, platform.iobus, 0);
|
||||
|
||||
@ -179,8 +177,11 @@ configure(void *dummy)
|
||||
if (isa_bus_device)
|
||||
isa_probe_children(isa_bus_device);
|
||||
#endif
|
||||
}
|
||||
|
||||
configure_finish();
|
||||
static void
|
||||
configure_final(void *dummy)
|
||||
{
|
||||
|
||||
/*
|
||||
* Now we're ready to handle (pending) interrupts.
|
||||
|
@ -49,8 +49,15 @@
|
||||
#include <cam/cam_xpt_sim.h>
|
||||
#include <cam/cam_debug.h>
|
||||
|
||||
static void configure_first(void *);
|
||||
static void configure(void *);
|
||||
SYSINIT(configure, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL)
|
||||
static void configure_final(void *);
|
||||
|
||||
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);
|
||||
/* SI_ORDER_MIDDLE is hookable */
|
||||
SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL);
|
||||
|
||||
#ifdef BOOTP
|
||||
void bootpc_init(void);
|
||||
@ -64,6 +71,11 @@ device_t isa_bus_device = 0;
|
||||
/*
|
||||
* Determine i/o configuration for a machine.
|
||||
*/
|
||||
static void
|
||||
configure_first(void *dummy)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
configure(void *dummy)
|
||||
{
|
||||
@ -78,6 +90,11 @@ configure(void *dummy)
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user