Commit b3572e36 authored by James Bottomley's avatar James Bottomley Committed by Ingo Molnar

x86/voyager: fix compile breakage caused by dc1e35c6

Impact: build fix on x86/Voyager

Given commits like this:

| Author: Suresh Siddha <suresh.b.siddha@intel.com>
| Date:   Tue Jul 29 10:29:19 2008 -0700
|
|     x86, xsave: enable xsave/xrstor on cpus with xsave support

Which deliberately expose boot cpu dependence to pieces of the system,
I think it's time to explicitly have a variable for it to prevent this
continual misassumption that the boot CPU is zero.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 9e41bff2
...@@ -231,6 +231,10 @@ config SMP ...@@ -231,6 +231,10 @@ config SMP
If you don't know what to do here, say N. If you don't know what to do here, say N.
config X86_HAS_BOOT_CPU_ID
def_bool y
depends on X86_VOYAGER
config X86_FIND_SMP_CONFIG config X86_FIND_SMP_CONFIG
def_bool y def_bool y
depends on X86_MPPARSE || X86_VOYAGER depends on X86_MPPARSE || X86_VOYAGER
......
...@@ -225,5 +225,11 @@ static inline int hard_smp_processor_id(void) ...@@ -225,5 +225,11 @@ static inline int hard_smp_processor_id(void)
#endif /* CONFIG_X86_LOCAL_APIC */ #endif /* CONFIG_X86_LOCAL_APIC */
#ifdef CONFIG_X86_HAS_BOOT_CPU_ID
extern unsigned char boot_cpu_id;
#else
#define boot_cpu_id 0
#endif
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* _ASM_X86_SMP_H */ #endif /* _ASM_X86_SMP_H */
...@@ -1134,7 +1134,7 @@ void __cpuinit cpu_init(void) ...@@ -1134,7 +1134,7 @@ void __cpuinit cpu_init(void)
/* /*
* Boot processor to setup the FP and extended state context info. * Boot processor to setup the FP and extended state context info.
*/ */
if (!smp_processor_id()) if (smp_processor_id() == boot_cpu_id)
init_thread_xstate(); init_thread_xstate();
xsave_init(); xsave_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment