diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-03-19 13:25:46 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:02 -0400 |
commit | 4c07ad6950c2c7077c6d60a3ce83fdbbb553bd65 (patch) | |
tree | f9dfc2b4c745773bb927026884188ea6f4a20ecc /arch/x86/kernel/smpboot_32.c | |
parent | 365c894c65b98da944992199ea24206f531674de (diff) |
x86: don't span a new worker in __smp_prepare_cpu
We can do it now that do_boot_cpu has its own worker.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smpboot_32.c')
-rw-r--r-- | arch/x86/kernel/smpboot_32.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c index fc1eb5255f66..c03596e11db8 100644 --- a/arch/x86/kernel/smpboot_32.c +++ b/arch/x86/kernel/smpboot_32.c | |||
@@ -699,44 +699,18 @@ void cpu_exit_clear(void) | |||
699 | } | 699 | } |
700 | #endif | 700 | #endif |
701 | 701 | ||
702 | struct warm_boot_cpu_info { | ||
703 | struct completion *complete; | ||
704 | struct work_struct task; | ||
705 | int apicid; | ||
706 | int cpu; | ||
707 | }; | ||
708 | |||
709 | static void __cpuinit do_warm_boot_cpu(struct work_struct *work) | ||
710 | { | ||
711 | struct warm_boot_cpu_info *info = | ||
712 | container_of(work, struct warm_boot_cpu_info, task); | ||
713 | do_boot_cpu(info->apicid, info->cpu); | ||
714 | complete(info->complete); | ||
715 | } | ||
716 | |||
717 | static void __cpuinit __smp_prepare_cpu(int cpu) | 702 | static void __cpuinit __smp_prepare_cpu(int cpu) |
718 | { | 703 | { |
719 | DECLARE_COMPLETION_ONSTACK(done); | ||
720 | struct warm_boot_cpu_info info; | ||
721 | int apicid; | 704 | int apicid; |
722 | 705 | ||
723 | apicid = per_cpu(x86_cpu_to_apicid, cpu); | 706 | apicid = per_cpu(x86_cpu_to_apicid, cpu); |
724 | 707 | ||
725 | info.complete = &done; | ||
726 | info.apicid = apicid; | ||
727 | info.cpu = cpu; | ||
728 | INIT_WORK(&info.task, do_warm_boot_cpu); | ||
729 | |||
730 | /* init low mem mapping */ | 708 | /* init low mem mapping */ |
731 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, | 709 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, |
732 | min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS)); | 710 | min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS)); |
733 | flush_tlb_all(); | 711 | flush_tlb_all(); |
734 | if (!keventd_up() || current_is_keventd()) | 712 | |
735 | info.task.func(&info.task); | 713 | do_boot_cpu(apicid, cpu); |
736 | else { | ||
737 | schedule_work(&info.task); | ||
738 | wait_for_completion(&done); | ||
739 | } | ||
740 | } | 714 | } |
741 | 715 | ||
742 | static int boot_cpu_logical_apicid; | 716 | static int boot_cpu_logical_apicid; |