Better interface for hooking early initcalls
[deliverable/linux.git] / init / main.c
index 2769dc031c6222d077206619f755727f7433d3dd..b6fec08dbbef65236edd042b7834be771de6faf0 100644 (file)
@@ -87,8 +87,6 @@ extern void init_IRQ(void);
 extern void fork_init(unsigned long);
 extern void mca_init(void);
 extern void sbus_init(void);
-extern void pidhash_init(void);
-extern void pidmap_init(void);
 extern void prio_tree_init(void);
 extern void radix_tree_init(void);
 extern void free_initmem(void);
@@ -745,13 +743,13 @@ static void __init do_one_initcall(initcall_t fn)
 }
 
 
-extern initcall_t __initcall_start[], __initcall_end[];
+extern initcall_t __initcall_start[], __initcall_end[], __early_initcall_end[];
 
 static void __init do_initcalls(void)
 {
        initcall_t *call;
 
-       for (call = __initcall_start; call < __initcall_end; call++)
+       for (call = __early_initcall_end; call < __initcall_end; call++)
                do_one_initcall(*call);
 
        /* Make sure there is no pending stuff from the initcall sequence */
@@ -785,6 +783,14 @@ static int __init nosoftlockup_setup(char *str)
 }
 __setup("nosoftlockup", nosoftlockup_setup);
 
+static void __init __do_pre_smp_initcalls(void)
+{
+       initcall_t *call;
+
+       for (call = __initcall_start; call < __early_initcall_end; call++)
+               do_one_initcall(*call);
+}
+
 static void __init do_pre_smp_initcalls(void)
 {
        extern int spawn_ksoftirqd(void);
@@ -867,6 +873,7 @@ static int __init kernel_init(void * unused)
 
        smp_prepare_cpus(setup_max_cpus);
 
+       __do_pre_smp_initcalls();
        do_pre_smp_initcalls();
 
        smp_init();
This page took 0.08643 seconds and 5 git commands to generate.