Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / init / main.c
index 63f5f6f..5d0eb1d 100644 (file)
@@ -512,6 +512,9 @@ asmlinkage void __init start_kernel(void)
        parse_args("Booting kernel", static_command_line, __start___param,
                   __stop___param - __start___param,
                   &unknown_bootoption);
+
+       jump_label_init();
+
        /*
         * These use large bootmem allocations and must precede
         * kmem_cache_init()
@@ -560,9 +563,6 @@ asmlinkage void __init start_kernel(void)
        early_boot_irqs_disabled = false;
        local_irq_enable();
 
-       /* Interrupts are enabled now so all GFP allocations are safe. */
-       gfp_allowed_mask = __GFP_BITS_MASK;
-
        kmem_cache_init_late();
 
        /*
@@ -606,7 +606,7 @@ asmlinkage void __init start_kernel(void)
        pidmap_init();
        anon_vma_init();
 #ifdef CONFIG_X86
-       if (efi_enabled)
+       if (efi_enabled(EFI_RUNTIME_SERVICES))
                efi_enter_virtual_mode();
 #endif
        thread_info_cache_init();
@@ -795,6 +795,10 @@ static int __init kernel_init(void * unused)
         * Wait until kthreadd is all set-up.
         */
        wait_for_completion(&kthreadd_done);
+
+       /* Now the scheduler is fully set up and can do blocking allocations */
+       gfp_allowed_mask = __GFP_BITS_MASK;
+
        /*
         * init can allocate pages on any node
         */