x86, ia64, smp: use workqueues unconditionally during do_boot_cpu()
authorSuresh Siddha <[email protected]>
Tue, 10 Aug 2010 00:20:33 +0000 (17:20 -0700)
committerLinus Torvalds <[email protected]>
Tue, 10 Aug 2010 03:45:06 +0000 (20:45 -0700)
Workqueues are now initialized as part of the early_initcall().  So they
are available for use during cold boot process aswell.

Signed-off-by: Suresh Siddha <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Tony Luck <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/ia64/kernel/smpboot.c
arch/x86/kernel/smpboot.c

index 1d85d8cfaa7d8a60c9561e7d6d306621da2f39a6..d003b502a432dfdefe22b16a1f8998e7ddea22cc 100644 (file)
@@ -508,21 +508,18 @@ do_boot_cpu (int sapicid, int cpu)
                .done   = COMPLETION_INITIALIZER(c_idle.done),
        };
 
+       /*
+        * We can't use kernel_thread since we must avoid to
+        * reschedule the child.
+        */
        c_idle.idle = get_idle_for_cpu(cpu);
        if (c_idle.idle) {
                init_idle(c_idle.idle, cpu);
                goto do_rest;
        }
 
-       /*
-        * We can't use kernel_thread since we must avoid to reschedule the child.
-        */
-       if (!keventd_up())
-               c_idle.work.func(&c_idle.work);
-       else {
-               schedule_work(&c_idle.work);
-               wait_for_completion(&c_idle.done);
-       }
+       schedule_work(&c_idle.work);
+       wait_for_completion(&c_idle.done);
 
        if (IS_ERR(c_idle.idle))
                panic("failed fork for CPU %d", cpu);
index 51620953b18ac53967d47bb28b555ecacf906aeb..a5e928b0cb5fafad8d476fdf0f34407f8cf86983 100644 (file)
@@ -735,12 +735,8 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
                goto do_rest;
        }
 
-       if (!keventd_up())
-               c_idle.work.func(&c_idle.work);
-       else {
-               schedule_work(&c_idle.work);
-               wait_for_completion(&c_idle.done);
-       }
+       schedule_work(&c_idle.work);
+       wait_for_completion(&c_idle.done);
 
        if (IS_ERR(c_idle.idle)) {
                printk("failed fork for CPU %d\n", cpu);