aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/Kconfig4
-rw-r--r--arch/x86/include/asm/smp.h6
-rw-r--r--arch/x86/kernel/cpu/common.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 350bee1d54dc..2a40c4c6dd7d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -231,6 +231,10 @@ config SMP
231 231
232 If you don't know what to do here, say N. 232 If you don't know what to do here, say N.
233 233
234config X86_HAS_BOOT_CPU_ID
235 def_bool y
236 depends on X86_VOYAGER
237
234config X86_FIND_SMP_CONFIG 238config X86_FIND_SMP_CONFIG
235 def_bool y 239 def_bool y
236 depends on X86_MPPARSE || X86_VOYAGER 240 depends on X86_MPPARSE || X86_VOYAGER
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 2766021aef80..d12811ce51d9 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -225,5 +225,11 @@ static inline int hard_smp_processor_id(void)
225 225
226#endif /* CONFIG_X86_LOCAL_APIC */ 226#endif /* CONFIG_X86_LOCAL_APIC */
227 227
228#ifdef CONFIG_X86_HAS_BOOT_CPU_ID
229extern unsigned char boot_cpu_id;
230#else
231#define boot_cpu_id 0
232#endif
233
228#endif /* __ASSEMBLY__ */ 234#endif /* __ASSEMBLY__ */
229#endif /* _ASM_X86_SMP_H */ 235#endif /* _ASM_X86_SMP_H */
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 25581dcb280e..93e9393ea64a 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1134,7 +1134,7 @@ void __cpuinit cpu_init(void)
1134 /* 1134 /*
1135 * Boot processor to setup the FP and extended state context info. 1135 * Boot processor to setup the FP and extended state context info.
1136 */ 1136 */
1137 if (!smp_processor_id()) 1137 if (smp_processor_id() == boot_cpu_id)
1138 init_thread_xstate(); 1138 init_thread_xstate();
1139 1139
1140 xsave_init(); 1140 xsave_init();