@@ -222,7 +222,6 @@ static void notrace start_secondary(void *unused)
lock_vector_lock();
set_cpu_online(smp_processor_id(), true);
unlock_vector_lock();
- per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
x86_platform.nmi_init();
/* enable local interrupts */
@@ -234,6 +233,7 @@ static void notrace start_secondary(void *unused)
x86_cpuinit.setup_percpu_clockev();
wmb();
+ per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
cpu_startup_entry(CPUHP_ONLINE);
}
@@ -932,7 +932,7 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
check_tsc_sync_source(cpu);
local_irq_restore(flags);
- while (!cpu_online(cpu)) {
+ while (per_cpu(cpu_state,cpu) != CPU_ONLINE) {
cpu_relax();
touch_nmi_watchdog();
}