summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2023-03-16 22:21:05 +0000
committerThomas Gleixner <tglx@linutronix.de>2023-03-21 13:35:53 +0100
commit8f6be6d870e8a078fcc956fc2ff8d7cff67795ee (patch)
treeda909e2da004596011c3d04b03343e889fca6479 /arch/x86/kernel/smpboot.c
parentc253b64020c7a7c7a1f6adf8922456614be0f665 (diff)
downloadlinux-stable-8f6be6d870e8a078fcc956fc2ff8d7cff67795ee.tar.gz
linux-stable-8f6be6d870e8a078fcc956fc2ff8d7cff67795ee.tar.bz2
linux-stable-8f6be6d870e8a078fcc956fc2ff8d7cff67795ee.zip
x86/smpboot: Remove initial_gs
Given its CPU#, each CPU can find its own per-cpu offset, and directly set GSBASE accordingly. The global variable can be eliminated. Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Usama Arif <usama.arif@bytedance.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Usama Arif <usama.arif@bytedance.com> Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com> Reviewed-by: David Woodhouse <dwmw@amazon.co.uk> Link: https://lore.kernel.org/r/20230316222109.1940300-9-usama.arif@bytedance.com
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 94e6c54ddb70..b7d478de79e5 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1059,8 +1059,6 @@ int common_cpu_up(unsigned int cpu, struct task_struct *idle)
#ifdef CONFIG_X86_32
/* Stack for startup_32 can be just as for start_secondary onwards */
per_cpu(pcpu_hot.top_of_stack, cpu) = task_top_of_stack(idle);
-#else
- initial_gs = per_cpu_offset(cpu);
#endif
return 0;
}