* half valid vector space.
*/
lock_vector_lock();
- /* Sync point with do_wait_cpu_online() */
set_cpu_online(smp_processor_id(), true);
lapic_online();
unlock_vector_lock();
return 0;
}
-/*
- * Bringup step three: Wait for the target AP to reach set_cpu_online() in
- * start_secondary().
- */
-static void wait_cpu_online(unsigned int cpu)
-{
- /*
- * Wait for the AP to mark itself online, so the core caller
- * can drop sparse_irq_lock.
- */
- while (!cpu_online(cpu))
- schedule();
-}
-
static int native_kick_ap(unsigned int cpu, struct task_struct *tidle)
{
int apicid = apic->cpu_present_to_apicid(cpu);
int ret;
ret = native_kick_ap(cpu, tidle);
- if (ret)
- goto out;
-
- ret = wait_cpu_initialized(cpu);
- if (ret)
- goto out;
-
- wait_cpu_online(cpu);
+ if (!ret)
+ ret = wait_cpu_initialized(cpu);
-out:
/* Cleanup possible dangling ends... */
if (x86_platform.legacy.warm_reset)
smpboot_restore_warm_reset_vector();