Merge tag 'x86-urgent-2024-03-24' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / arch / x86 / kernel / cpu / common.c
index ba8cf5e..5c1e6d6 100644 (file)
@@ -2307,6 +2307,8 @@ void arch_smt_update(void)
 
 void __init arch_cpu_finalize_init(void)
 {
+       struct cpuinfo_x86 *c = this_cpu_ptr(&cpu_info);
+
        identify_boot_cpu();
 
        select_idle_routine();
@@ -2345,6 +2347,13 @@ void __init arch_cpu_finalize_init(void)
        fpu__init_system();
        fpu__init_cpu();
 
+       /*
+        * Ensure that access to the per CPU representation has the initial
+        * boot CPU configuration.
+        */
+       *c = boot_cpu_data;
+       c->initialized = true;
+
        alternative_instructions();
 
        if (IS_ENABLED(CONFIG_X86_64)) {