Merge branch 'for-4.9' into for-4.10
[linux-2.6-block.git] / init / main.c
index 2858be732f6d25dd8431cd994645c8c6af3828c2..9af9274525b590f077a518b135d3d1adac9b45f3 100644 (file)
@@ -551,6 +551,14 @@ asmlinkage __visible void __init start_kernel(void)
                 "Interrupts were enabled *very* early, fixing it\n"))
                local_irq_disable();
        idr_init_cache();
+
+       /*
+        * Allow workqueue creation and work item queueing/cancelling
+        * early.  Work item execution depends on kthreads and starts after
+        * workqueue_init().
+        */
+       workqueue_init_early();
+
        rcu_init();
 
        /* trace_printk() and trace points may be used after this */
@@ -1006,6 +1014,8 @@ static noinline void __init kernel_init_freeable(void)
 
        smp_prepare_cpus(setup_max_cpus);
 
+       workqueue_init();
+
        do_pre_smp_initcalls();
        lockup_detector_init();