Commit d7a7c573936a86474c4a5090a45a4bc6e680c117
Committed by
Linus Torvalds
1 parent
e446127134
Exists in
master
and in
4 other branches
x86, ia64, smp: use workqueues unconditionally during do_boot_cpu()
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 <suresh.b.siddha@intel.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tejun Heo <tj@kernel.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 8 additions and 15 deletions Side-by-side Diff
arch/ia64/kernel/smpboot.c
... | ... | @@ -508,21 +508,18 @@ |
508 | 508 | .done = COMPLETION_INITIALIZER(c_idle.done), |
509 | 509 | }; |
510 | 510 | |
511 | + /* | |
512 | + * We can't use kernel_thread since we must avoid to | |
513 | + * reschedule the child. | |
514 | + */ | |
511 | 515 | c_idle.idle = get_idle_for_cpu(cpu); |
512 | 516 | if (c_idle.idle) { |
513 | 517 | init_idle(c_idle.idle, cpu); |
514 | 518 | goto do_rest; |
515 | 519 | } |
516 | 520 | |
517 | - /* | |
518 | - * We can't use kernel_thread since we must avoid to reschedule the child. | |
519 | - */ | |
520 | - if (!keventd_up()) | |
521 | - c_idle.work.func(&c_idle.work); | |
522 | - else { | |
523 | - schedule_work(&c_idle.work); | |
524 | - wait_for_completion(&c_idle.done); | |
525 | - } | |
521 | + schedule_work(&c_idle.work); | |
522 | + wait_for_completion(&c_idle.done); | |
526 | 523 | |
527 | 524 | if (IS_ERR(c_idle.idle)) |
528 | 525 | panic("failed fork for CPU %d", cpu); |
arch/x86/kernel/smpboot.c
... | ... | @@ -735,12 +735,8 @@ |
735 | 735 | goto do_rest; |
736 | 736 | } |
737 | 737 | |
738 | - if (!keventd_up()) | |
739 | - c_idle.work.func(&c_idle.work); | |
740 | - else { | |
741 | - schedule_work(&c_idle.work); | |
742 | - wait_for_completion(&c_idle.done); | |
743 | - } | |
738 | + schedule_work(&c_idle.work); | |
739 | + wait_for_completion(&c_idle.done); | |
744 | 740 | |
745 | 741 | if (IS_ERR(c_idle.idle)) { |
746 | 742 | printk("failed fork for CPU %d\n", cpu); |