diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2022-09-15 14:10:42 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-10-17 17:40:56 +0300 |
commit | 1f19e2d50baf6515991844eaa8a84a0b0037da70 (patch) | |
tree | 6d84eb4e93ff86a34b3678b284f802cf696db10c /arch/x86/xen/enlighten_pv.c | |
parent | b5636d45aae42aa345b4c7918bdef245ed63da68 (diff) | |
download | linux-1f19e2d50baf6515991844eaa8a84a0b0037da70.tar.xz |
x86/cpu: Get rid of redundant switch_to_new_gdt() invocations
The only place where switch_to_new_gdt() is required is early boot to
switch from the early GDT to the direct GDT. Any other invocation is
completely redundant because it does not change anything.
Secondary CPUs come out of the ASM code with GDT and GSBASE correctly set
up. The same is true for XEN_PV.
Remove all the voodoo invocations which are left overs from the ancient
past, rename the function to switch_gdt_and_percpu_base() and mark it init.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220915111143.198076128@infradead.org
Diffstat (limited to 'arch/x86/xen/enlighten_pv.c')
-rw-r--r-- | arch/x86/xen/enlighten_pv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index f82857e48815..9b892079581b 100644 --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen/enlighten_pv.c @@ -1209,7 +1209,7 @@ static void __init xen_setup_gdt(int cpu) pv_ops.cpu.write_gdt_entry = xen_write_gdt_entry_boot; pv_ops.cpu.load_gdt = xen_load_gdt_boot; - switch_to_new_gdt(cpu); + switch_gdt_and_percpu_base(cpu); pv_ops.cpu.write_gdt_entry = xen_write_gdt_entry; pv_ops.cpu.load_gdt = xen_load_gdt; |