|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/smp: Drop booting_cpu
commit 5f5d5da236b6510dc5928bcfc13af433e1c9c338
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Sun May 11 00:27:05 2025 +0100
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue May 13 14:49:12 2025 +0100
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.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/smpboot.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 54207e6d88..49e1110182 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -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. */
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |