Merge branches 'clk-ingenic', 'clk-mtk-mux', 'clk-qcom-sdm845-pcie', 'clk-mtk-crit...
[linux-2.6-microblaze.git] / init / main.c
index ee14710..c86a1c8 100644 (file)
 static int kernel_init(void *);
 
 extern void init_IRQ(void);
-extern void fork_init(void);
 extern void radix_tree_init(void);
 
 /*
@@ -521,6 +520,7 @@ static void __init mm_init(void)
        mem_init();
        kmem_cache_init();
        pgtable_init();
+       debug_objects_mem_init();
        vmalloc_init();
        ioremap_huge_init();
        /* Should be run before the first non-init thread is created */
@@ -695,9 +695,7 @@ asmlinkage __visible void __init start_kernel(void)
                initrd_start = 0;
        }
 #endif
-       page_ext_init();
        kmemleak_init();
-       debug_objects_mem_init();
        setup_per_cpu_pageset();
        numa_policy_init();
        acpi_early_init();
@@ -737,10 +735,6 @@ asmlinkage __visible void __init start_kernel(void)
        arch_post_acpi_subsys_init();
        sfi_init_late();
 
-       if (efi_enabled(EFI_RUNTIME_SERVICES)) {
-               efi_free_boot_services();
-       }
-
        /* Do the rest non-__init'ed, we're now alive */
        arch_call_rest_init();
 }
@@ -934,7 +928,7 @@ static initcall_entry_t *initcall_levels[] __initdata = {
 };
 
 /* Keep these in sync with initcalls in include/linux/init.h */
-static char *initcall_level_names[] __initdata = {
+static const char *initcall_level_names[] __initdata = {
        "pure",
        "core",
        "postcore",
@@ -996,17 +990,6 @@ static void __init do_pre_smp_initcalls(void)
                do_one_initcall(initcall_from_entry(fn));
 }
 
-/*
- * This function requests modules which should be loaded by default and is
- * called twice right after initrd is mounted and right before init is
- * exec'd.  If such modules are on either initrd or rootfs, they will be
- * loaded before control is passed to userland.
- */
-void __init load_default_modules(void)
-{
-       load_default_elevator_module();
-}
-
 static int run_init_process(const char *init_filename)
 {
        argv_init[0] = init_filename;
@@ -1046,12 +1029,12 @@ static void mark_readonly(void)
 {
        if (rodata_enabled) {
                /*
-                * load_module() results in W+X mappings, which are cleaned up
-                * with call_rcu_sched().  Let's make sure that queued work is
+                * load_module() results in W+X mappings, which are cleaned
+                * up with call_rcu().  Let's make sure that queued work is
                 * flushed so that we don't hit false positives looking for
                 * insecure pages which are W+X.
                 */
-               rcu_barrier_sched();
+               rcu_barrier();
                mark_rodata_ro();
                rodata_test();
        } else
@@ -1147,6 +1130,8 @@ static noinline void __init kernel_init_freeable(void)
        sched_init_smp();
 
        page_alloc_init_late();
+       /* Initialize page ext after all struct pages are initialized. */
+       page_ext_init();
 
        do_basic_setup();
 
@@ -1180,5 +1165,4 @@ static noinline void __init kernel_init_freeable(void)
         */
 
        integrity_load_keys();
-       load_default_modules();
 }