Commit 666e1156 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Peter Zijlstra

x86/smpboot: Rename start_cpu0() to soft_restart_cpu()

This is used in the SEV play_dead() implementation to re-online CPUs. But
that has nothing to do with CPU0.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: default avatarMichael Kelley <mikelley@microsoft.com>
Tested-by: default avatarOleksandr 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/20230512205255.662319599@linutronix.de
parent 134a1282
...@@ -30,7 +30,7 @@ struct x86_cpu { ...@@ -30,7 +30,7 @@ struct x86_cpu {
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
extern int arch_register_cpu(int num); extern int arch_register_cpu(int num);
extern void arch_unregister_cpu(int); extern void arch_unregister_cpu(int);
extern void start_cpu0(void); extern void soft_restart_cpu(void);
#ifdef CONFIG_DEBUG_HOTPLUG_CPU0 #ifdef CONFIG_DEBUG_HOTPLUG_CPU0
extern int _debug_hotplug_cpu(int cpu, int action); extern int _debug_hotplug_cpu(int cpu, int action);
#endif #endif
......
...@@ -134,7 +134,7 @@ static bool skip_addr(void *dest) ...@@ -134,7 +134,7 @@ static bool skip_addr(void *dest)
if (dest == ret_from_fork) if (dest == ret_from_fork)
return true; return true;
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
if (dest == start_cpu0) if (dest == soft_restart_cpu)
return true; return true;
#endif #endif
#ifdef CONFIG_FUNCTION_TRACER #ifdef CONFIG_FUNCTION_TRACER
......
...@@ -140,16 +140,16 @@ SYM_CODE_END(startup_32) ...@@ -140,16 +140,16 @@ SYM_CODE_END(startup_32)
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
/* /*
* Boot CPU0 entry point. It's called from play_dead(). Everything has been set * Entry point for soft restart of a CPU. Invoked from xxx_play_dead() for
* up already except stack. We just set up stack here. Then call * restarting the boot CPU or for restarting SEV guest CPUs after CPU hot
* start_secondary(). * unplug. Everything is set up already except the stack.
*/ */
SYM_FUNC_START(start_cpu0) SYM_FUNC_START(soft_restart_cpu)
movl initial_stack, %ecx movl initial_stack, %ecx
movl %ecx, %esp movl %ecx, %esp
call *(initial_code) call *(initial_code)
1: jmp 1b 1: jmp 1b
SYM_FUNC_END(start_cpu0) SYM_FUNC_END(soft_restart_cpu)
#endif #endif
/* /*
......
...@@ -377,11 +377,11 @@ SYM_CODE_END(secondary_startup_64) ...@@ -377,11 +377,11 @@ SYM_CODE_END(secondary_startup_64)
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
/* /*
* Boot CPU0 entry point. It's called from play_dead(). Everything has been set * Entry point for soft restart of a CPU. Invoked from xxx_play_dead() for
* up already except stack. We just set up stack here. Then call * restarting the boot CPU or for restarting SEV guest CPUs after CPU hot
* start_secondary() via .Ljump_to_C_code. * unplug. Everything is set up already except the stack.
*/ */
SYM_CODE_START(start_cpu0) SYM_CODE_START(soft_restart_cpu)
ANNOTATE_NOENDBR ANNOTATE_NOENDBR
UNWIND_HINT_END_OF_STACK UNWIND_HINT_END_OF_STACK
...@@ -390,7 +390,7 @@ SYM_CODE_START(start_cpu0) ...@@ -390,7 +390,7 @@ SYM_CODE_START(start_cpu0)
movq TASK_threadsp(%rcx), %rsp movq TASK_threadsp(%rcx), %rsp
jmp .Ljump_to_C_code jmp .Ljump_to_C_code
SYM_CODE_END(start_cpu0) SYM_CODE_END(soft_restart_cpu)
#endif #endif
#ifdef CONFIG_AMD_MEM_ENCRYPT #ifdef CONFIG_AMD_MEM_ENCRYPT
......
...@@ -1328,7 +1328,7 @@ static void sev_es_play_dead(void) ...@@ -1328,7 +1328,7 @@ static void sev_es_play_dead(void)
* If we get here, the VCPU was woken up again. Jump to CPU * If we get here, the VCPU was woken up again. Jump to CPU
* startup code to get it back online. * startup code to get it back online.
*/ */
start_cpu0(); soft_restart_cpu();
} }
#else /* CONFIG_HOTPLUG_CPU */ #else /* CONFIG_HOTPLUG_CPU */
#define sev_es_play_dead native_play_dead #define sev_es_play_dead native_play_dead
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment