diff options
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 25581dcb280e..b9c9ea0217a9 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/pat.h> | 20 | #include <asm/pat.h> |
21 | #include <asm/asm.h> | 21 | #include <asm/asm.h> |
22 | #include <asm/numa.h> | 22 | #include <asm/numa.h> |
23 | #include <asm/smp.h> | ||
23 | #ifdef CONFIG_X86_LOCAL_APIC | 24 | #ifdef CONFIG_X86_LOCAL_APIC |
24 | #include <asm/mpspec.h> | 25 | #include <asm/mpspec.h> |
25 | #include <asm/apic.h> | 26 | #include <asm/apic.h> |
@@ -549,6 +550,10 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) | |||
549 | this_cpu->c_early_init(c); | 550 | this_cpu->c_early_init(c); |
550 | 551 | ||
551 | validate_pat_support(c); | 552 | validate_pat_support(c); |
553 | |||
554 | #ifdef CONFIG_SMP | ||
555 | c->cpu_index = boot_cpu_id; | ||
556 | #endif | ||
552 | } | 557 | } |
553 | 558 | ||
554 | void __init early_cpu_init(void) | 559 | void __init early_cpu_init(void) |
@@ -1134,7 +1139,7 @@ void __cpuinit cpu_init(void) | |||
1134 | /* | 1139 | /* |
1135 | * Boot processor to setup the FP and extended state context info. | 1140 | * Boot processor to setup the FP and extended state context info. |
1136 | */ | 1141 | */ |
1137 | if (!smp_processor_id()) | 1142 | if (smp_processor_id() == boot_cpu_id) |
1138 | init_thread_xstate(); | 1143 | init_thread_xstate(); |
1139 | 1144 | ||
1140 | xsave_init(); | 1145 | xsave_init(); |