]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - init/main.c
async: Asynchronous function calls to speed up kernel boot
[mirror_ubuntu-artful-kernel.git] / init / main.c
index b5a892c68375287188f62125267b5cf51dbf2770..f66715d8a85382325826519b4148f48ddc6acadb 100644 (file)
@@ -62,6 +62,7 @@
 #include <linux/signal.h>
 #include <linux/idr.h>
 #include <linux/ftrace.h>
+#include <linux/async.h>
 #include <trace/boot.h>
 
 #include <asm/io.h>
@@ -684,7 +685,7 @@ asmlinkage void __init start_kernel(void)
        rest_init();
 }
 
-static int initcall_debug;
+int initcall_debug;
 core_param(initcall_debug, initcall_debug, bool, 0644);
 
 int do_one_initcall(initcall_t fn)
@@ -785,6 +786,8 @@ static void run_init_process(char *init_filename)
  */
 static noinline int init_post(void)
 {
+       /* need to finish all async __init code before freeing the memory */
+       async_synchronize_full();
        free_initmem();
        unlock_kernel();
        mark_rodata_ro();