[PATCH] x86/smp: Remove dead call to switch_gdt_and_percpu_base()
From: Brian Gerst
Date: Fri Apr 19 2024 - 12:52:43 EST
smpboot.c is only built when CONFIG_SMP is set, so the call to
switch_gdt_and_percpu_base() is dead code.
Signed-off-by: Brian Gerst <brgerst@xxxxxxxxx>
---
arch/x86/kernel/smpboot.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index a58109583c47..f752047688ab 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1128,12 +1128,6 @@ void arch_thaw_secondary_cpus_end(void)
*/
void __init native_smp_prepare_boot_cpu(void)
{
- int me = smp_processor_id();
-
- /* SMP handles this from setup_per_cpu_areas() */
- if (!IS_ENABLED(CONFIG_SMP))
- switch_gdt_and_percpu_base(me);
-
native_pv_lock_init();
}
base-commit: 7fcd76de8a7bc12e930ef383a157ce99d711715d
--
2.44.0