x86/cpu: Ensure that CPU info updates are propagated on UP
[sfrench/cifs-2.6.git] / arch / x86 / kernel / cpu / common.c
index ba8cf5e9ce5632aeaa9322899f5b5eaea3aab2e7..5c1e6d6be267af3e7b489e9f71937e7be6b25448 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)) {