mirror of
https://github.com/torvalds/linux.git
synced 2026-10-23 23:51:02 +02:00
x86/cpu: Move 32-bit SEP setup into identify_cpu()
identify_boot_cpu() and identify_secondary_cpu() both call enable_sep_cpu() under CONFIG_X86_32 immediately after identify_cpu(). Do it once and drop the ifdefs while at it. No functional changes. Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Link: https://patch.msgid.link/20260916195203.1099646-5-ihor.solodrai@linux.dev
This commit is contained in:
parent
ad86fe2134
commit
db349783ca
|
|
@ -2128,6 +2128,9 @@ static void identify_cpu(struct cpuinfo_x86 *c)
|
|||
mcheck_cpu_init(c);
|
||||
|
||||
numa_add_cpu(smp_processor_id());
|
||||
|
||||
if (IS_ENABLED(CONFIG_X86_32))
|
||||
enable_sep_cpu();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2165,9 +2168,6 @@ static __init void identify_boot_cpu(void)
|
|||
identify_cpu(&boot_cpu_data);
|
||||
if (HAS_KERNEL_IBT && cpu_feature_enabled(X86_FEATURE_IBT))
|
||||
pr_info("CET detected: Indirect Branch Tracking enabled\n");
|
||||
#ifdef CONFIG_X86_32
|
||||
enable_sep_cpu();
|
||||
#endif
|
||||
cpu_detect_tlb(&boot_cpu_data);
|
||||
setup_cr_pinning();
|
||||
|
||||
|
|
@ -2187,9 +2187,6 @@ void identify_secondary_cpu(unsigned int cpu)
|
|||
c->cpu_index = cpu;
|
||||
|
||||
identify_cpu(c);
|
||||
#ifdef CONFIG_X86_32
|
||||
enable_sep_cpu();
|
||||
#endif
|
||||
x86_spec_ctrl_setup_ap();
|
||||
update_srbds_msr();
|
||||
if (boot_cpu_has_bug(X86_BUG_GDS))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user