aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/common.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-05-15 16:05:16 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-18 02:43:25 -0400
commit2759c3287de27266e06f1f4e82cbd2d65f6a044c (patch)
tree78fa6a205d2e1c5f010f62e2ad50a181df1e5f47 /arch/x86/kernel/cpu/common.c
parente5198075c67a22ec9a09565b1ce88d3d3f5ba855 (diff)
x86: don't call read_apic_id if !cpu_has_apic
should not call that if apic is disabled. [ Impact: fix crash on certain UP configs ] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Cyrill Gorcunov <gorcunov@gmail.com> LKML-Reference: <4A09CCBB.2000306@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r--arch/x86/kernel/cpu/common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index c1caefc82e62..017c600e05ab 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -761,6 +761,12 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
761 if (this_cpu->c_identify) 761 if (this_cpu->c_identify)
762 this_cpu->c_identify(c); 762 this_cpu->c_identify(c);
763 763
764 /* Clear/Set all flags overriden by options, after probe */
765 for (i = 0; i < NCAPINTS; i++) {
766 c->x86_capability[i] &= ~cpu_caps_cleared[i];
767 c->x86_capability[i] |= cpu_caps_set[i];
768 }
769
764#ifdef CONFIG_X86_64 770#ifdef CONFIG_X86_64
765 c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); 771 c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
766#endif 772#endif