]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
x86/smpboot: Remove wait for cpu_online()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 28 Mar 2023 15:49:11 +0000 (17:49 +0200)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 30 Mar 2023 12:27:06 +0000 (14:27 +0200)
Now that the core code drops sparse_irq_lock after the idle thread
synchronized, it's pointless to wait for the AP to mark itself online.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/smpboot.c

index 925ca71fe19dfb1e62204dbd1cc082b2463045fa..7a00092c8ba75a818a9ac6e7c66bfdc55f6c7492 100644 (file)
@@ -1099,20 +1099,6 @@ static int wait_cpu_initialized(unsigned int cpu)
        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);
@@ -1159,16 +1145,9 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
        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();