aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/smp.h
diff options
context:
space:
mode:
authorGravatar Thomas Gleixner <tglx@linutronix.de> 2023-05-12 23:07:46 +0200
committerGravatar Peter Zijlstra <peterz@infradead.org> 2023-05-15 13:45:01 +0200
commit8b5a0f957cc5ca1f68486163d4da4683be3b47aa (patch)
tree36d328208d183a30dc52126496e2bd16a498f336 /arch/x86/include/asm/smp.h
parentcpu/hotplug: Provide a split up CPUHP_BRINGUP mechanism (diff)
downloadlinux-8b5a0f957cc5ca1f68486163d4da4683be3b47aa.tar.gz
linux-8b5a0f957cc5ca1f68486163d4da4683be3b47aa.tar.bz2
linux-8b5a0f957cc5ca1f68486163d4da4683be3b47aa.zip
x86/smpboot: Enable split CPU startup
The x86 CPU bringup state currently does AP wake-up, wait for AP to respond and then release it for full bringup. It is safe to be split into a wake-up and and a separate wait+release state. Provide the required functions and enable the split CPU bringup, which prepares for parallel bringup, where the bringup of the non-boot CPUs takes two iterations: One to prepare and wake all APs and the second to wait and release them. Depending on timing this can eliminate the wait time completely. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Michael Kelley <mikelley@microsoft.com> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Tested-by: Helge Deller <deller@gmx.de> # parisc Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com> # Steam Deck Link: https://lore.kernel.org/r/20230512205257.133453992@linutronix.de
Diffstat (limited to 'arch/x86/include/asm/smp.h')
-rw-r--r--arch/x86/include/asm/smp.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 693c9997c069..726c2a243eb0 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -40,7 +40,7 @@ struct smp_ops {
void (*cleanup_dead_cpu)(unsigned cpu);
void (*poll_sync_state)(void);
- int (*cpu_up)(unsigned cpu, struct task_struct *tidle);
+ int (*kick_ap_alive)(unsigned cpu, struct task_struct *tidle);
int (*cpu_disable)(void);
void (*cpu_die)(unsigned int cpu);
void (*play_dead)(void);
@@ -80,11 +80,6 @@ static inline void smp_cpus_done(unsigned int max_cpus)
smp_ops.smp_cpus_done(max_cpus);
}
-static inline int __cpu_up(unsigned int cpu, struct task_struct *tidle)
-{
- return smp_ops.cpu_up(cpu, tidle);
-}
-
static inline int __cpu_disable(void)
{
return smp_ops.cpu_disable();
@@ -124,7 +119,7 @@ void native_smp_prepare_cpus(unsigned int max_cpus);
void calculate_max_logical_packages(void);
void native_smp_cpus_done(unsigned int max_cpus);
int common_cpu_up(unsigned int cpunum, struct task_struct *tidle);
-int native_cpu_up(unsigned int cpunum, struct task_struct *tidle);
+int native_kick_ap(unsigned int cpu, struct task_struct *tidle);
int native_cpu_disable(void);
void __noreturn hlt_play_dead(void);
void native_play_dead(void);