Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / init / main.c
index 0e7aede..2c5ade7 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/smp_lock.h>
 #include <linux/initrd.h>
 #include <linux/bootmem.h>
+#include <linux/acpi.h>
 #include <linux/tty.h>
 #include <linux/gfp.h>
 #include <linux/percpu.h>
@@ -88,11 +89,6 @@ extern void sbus_init(void);
 extern void prio_tree_init(void);
 extern void radix_tree_init(void);
 extern void free_initmem(void);
-#ifdef CONFIG_ACPI
-extern void acpi_early_init(void);
-#else
-static inline void acpi_early_init(void) { }
-#endif
 #ifndef CONFIG_DEBUG_RODATA
 static inline void mark_rodata_ro(void) { }
 #endif
@@ -642,6 +638,10 @@ asmlinkage void __init start_kernel(void)
                                 "enabled early\n");
        early_boot_irqs_on();
        local_irq_enable();
+
+       /* Interrupts are enabled now so all GFP allocations are safe. */
+       set_gfp_allowed_mask(__GFP_BITS_MASK);
+
        kmem_cache_init_late();
 
        /*
@@ -674,7 +674,6 @@ asmlinkage void __init start_kernel(void)
 #endif
        page_cgroup_init();
        enable_debug_pagealloc();
-       cpu_hotplug_init();
        kmemtrace_init();
        kmemleak_init();
        debug_objects_mem_init();
@@ -720,6 +719,17 @@ asmlinkage void __init start_kernel(void)
        rest_init();
 }
 
+/* Call all constructor functions linked into the kernel. */
+static void __init do_ctors(void)
+{
+#ifdef CONFIG_CONSTRUCTORS
+       ctor_fn_t *call = (ctor_fn_t *) __ctors_start;
+
+       for (; call < (ctor_fn_t *) __ctors_end; call++)
+               (*call)();
+#endif
+}
+
 int initcall_debug;
 core_param(initcall_debug, initcall_debug, bool, 0644);
 
@@ -800,6 +810,7 @@ static void __init do_basic_setup(void)
        usermodehelper_init();
        driver_init();
        init_irq_proc();
+       do_ctors();
        do_initcalls();
 }