x86/smp: Drop booting_cpu
PATCH 1/1 x86/smp: Drop booting_cpu
Since commit 434596bbd44a ("x86/smpboot: Write the top-of-stack block in cpu_smpboot_alloc()"), smp_processor_id() is unconditionally usable on APs. Drop the global variable.
Also drop the parameter from start_secondary(). It was introduced as unused in commit e9ac3bbccab0 ("Move initial stack-pointer adjustment into assembly bootstrap code.") in 2005. At the time, the caller was a shared codepath with __start_xen() with a parameter on the stack, but that never mattered for start_secondary() which ultimately reset_stack_and_jump()'s out of context.
No functional change.
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
--- xen/arch/x86/smpboot.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
xen/arch/x86/smpboot.c +2 -11
@@ -226,8 +226,6 @@ static void smp_callin(void)cpu_relax (); } -static int booting_cpu; -/* CPUs for which sibling maps can be computed. */ static cpumask_t cpu_sibling_setup_map;
@@ -315,15 +313,10 @@ static void set_cpu_sibling_map(unsigned int cpu) } } -void asmlinkage start_secondary(void *unused) +void asmlinkage start_secondary(void) {struct cpu_info *info =get_cpu_info (); - -/* -* Dont put anything before smp_callin(), SMP booting is so fragile that we -* want to limit the things done here to the most necessary things. -*/ -unsigned int cpu = booting_cpu; +unsigned int cpu =smp_processor_id ();/* Critical region without IDT or TSS. Any fault is deadly! */
@@ -571,8 +564,6 @@ static int do_boot_cpu(int apicid, int cpu)*/ mtrr_save_state (); - booting_cpu = cpu; - start_eip =bootsym_phys (entry_SIPI16);/* start_eip needs be page aligned, and below the 1M boundary. */
Signature · 1 line
2.39.5
Quoted 10 lines · Andrew Cooper
Since commit
434596bbd44a("x86/smpboot: Write the top-of-stack block incpu_smpboot_alloc()"),smp_processor_id()is unconditionally usable on APs. Drop the global variable.Also drop the parameter from
start_secondary(). It was introduced as unused in commite9ac3bbccab0("Move initial stack-pointer adjustment into assembly bootstrap code.") in 2005. At the time, the caller was a shared codepath with__start_xen()with a parameter on the stack, but that never mattered forstart_secondary()which ultimately reset_stack_and_jump()'s out of context.
Quoted 3 lines
No functional change.
Signed-off-by Andrew Cooper <[email protected]>