]> git.neil.brown.name Git - history.git/commitdiff
Fix generic device layer init sequence.
authorDavid S. Miller <davem@nuts.ninka.net>
Wed, 5 Jun 2002 20:22:35 +0000 (13:22 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Wed, 5 Jun 2002 20:22:35 +0000 (13:22 -0700)
Generic BUS objects have to be registered before
devices assosciated with them are probed.  Therefore
subsys_initcall is inappropriate for such setups.
It does not work to use core_initcall for this because
the generic device layer bits need to be setup first too.
So we rename unused_initcall to postcore_initcall and use
this new initcall level for generic BUS object init.
This fixes bootup on Alpha, and Sparc64.  X86 was working
by what looks to be luck in link order.

drivers/base/sys.c
drivers/pci/pci-driver.c
include/linux/init.h

index 32c30d77ca278d5895f32b2614d679bc33ceb1a9..9098ef7e906b204807eee0b7149602b418f69958 100644 (file)
@@ -44,6 +44,6 @@ static int sys_bus_init(void)
        return device_register(&system_bus);
 }
 
-subsys_initcall(sys_bus_init);
+postcore_initcall(sys_bus_init);
 EXPORT_SYMBOL(register_sys_device);
 EXPORT_SYMBOL(unregister_sys_device);
index e5bad37436f9f40f730698446336f255c7641171..7bfbbab8087f05b8bb302a72ecbacd2744d7ce70 100644 (file)
@@ -204,7 +204,7 @@ static int __init pci_driver_init(void)
        return bus_register(&pci_bus_type);
 }
 
-subsys_initcall(pci_driver_init);
+postcore_initcall(pci_driver_init);
 
 EXPORT_SYMBOL(pci_match_device);
 EXPORT_SYMBOL(pci_register_driver);
index ca7e75f378835616487fbcf347be04b59c480b35..b45b95c5e640c9b9f5377d36f9144d06b4a24753 100644 (file)
@@ -61,7 +61,7 @@ extern initcall_t __initcall_start, __initcall_end;
        static initcall_t __initcall_##fn __attribute__ ((unused,__section__ (".initcall" level ".init"))) = fn
 
 #define core_initcall(fn)              __define_initcall("1",fn)
-#define unused_initcall(fn)            __define_initcall("2",fn)
+#define postcore_initcall(fn)          __define_initcall("2",fn)
 #define arch_initcall(fn)              __define_initcall("3",fn)
 #define subsys_initcall(fn)            __define_initcall("4",fn)
 #define fs_initcall(fn)                        __define_initcall("5",fn)
@@ -160,7 +160,7 @@ typedef void (*__cleanup_module_func_t)(void);
 #define __setup(str,func) /* nothing */
 
 #define core_initcall(fn)              module_init(fn)
-#define unused_initcall(fn)            module_init(fn)
+#define postcore_initcall(fn)          module_init(fn)
 #define arch_initcall(fn)              module_init(fn)
 #define subsys_initcall(fn)            module_init(fn)
 #define fs_initcall(fn)                        module_init(fn)