lkml.org 
[lkml]   [2023]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[patch 15/37] x86/smpboot: Remove wait for cpu_online()
Date
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 | 25 ++-----------------------
1 file changed, 2 insertions(+), 23 deletions(-)

--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1110,20 +1110,6 @@ static int wait_cpu_initialized(unsigned
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);
@@ -1170,16 +1156,9 @@ int native_cpu_up(unsigned int cpu, stru
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();
\
 
 \ /
  Last update: 2023-04-15 01:47    [W:0.471 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site