aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 674026455fee..c15d0073c829 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -97,8 +97,6 @@ DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_llc_shared_map);
97DEFINE_PER_CPU_READ_MOSTLY(struct cpuinfo_x86, cpu_info); 97DEFINE_PER_CPU_READ_MOSTLY(struct cpuinfo_x86, cpu_info);
98EXPORT_PER_CPU_SYMBOL(cpu_info); 98EXPORT_PER_CPU_SYMBOL(cpu_info);
99 99
100atomic_t init_deasserted;
101
102static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) 100static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
103{ 101{
104 unsigned long flags; 102 unsigned long flags;
@@ -146,16 +144,11 @@ static void smp_callin(void)
146 144
147 /* 145 /*
148 * If waken up by an INIT in an 82489DX configuration 146 * If waken up by an INIT in an 82489DX configuration
149 * we may get here before an INIT-deassert IPI reaches 147 * cpu_callout_mask guarantees we don't get here before
150 * our local APIC. We have to wait for the IPI or we'll 148 * an INIT_deassert IPI reaches our local APIC, so it is
151 * lock up on an APIC access. 149 * now safe to touch our local APIC.
152 *
153 * Since CPU0 is not wakened up by INIT, it doesn't wait for the IPI.
154 */ 150 */
155 cpuid = smp_processor_id(); 151 cpuid = smp_processor_id();
156 if (apic->wait_for_init_deassert && cpuid)
157 while (!atomic_read(&init_deasserted))
158 cpu_relax();
159 152
160 /* 153 /*
161 * (This works even if the APIC is not enabled.) 154 * (This works even if the APIC is not enabled.)
@@ -620,7 +613,6 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
620 send_status = safe_apic_wait_icr_idle(); 613 send_status = safe_apic_wait_icr_idle();
621 614
622 mb(); 615 mb();
623 atomic_set(&init_deasserted, 1);
624 616
625 /* 617 /*
626 * Should we send STARTUP IPIs ? 618 * Should we send STARTUP IPIs ?
@@ -861,8 +853,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
861 * the targeted processor. 853 * the targeted processor.
862 */ 854 */
863 855
864 atomic_set(&init_deasserted, 0);
865
866 if (get_uv_system_type() != UV_NON_UNIQUE_APIC) { 856 if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
867 857
868 pr_debug("Setting warm reset code and vector.\n"); 858 pr_debug("Setting warm reset code and vector.\n");