diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-05-15 13:05:16 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-18 08:43:25 +0200 |
commit | 2759c3287de27266e06f1f4e82cbd2d65f6a044c (patch) | |
tree | 78fa6a205d2e1c5f010f62e2ad50a181df1e5f47 /arch/x86/kernel/cpu/common.c | |
parent | e5198075c67a22ec9a09565b1ce88d3d3f5ba855 (diff) | |
download | blackbird-op-linux-2759c3287de27266e06f1f4e82cbd2d65f6a044c.tar.gz blackbird-op-linux-2759c3287de27266e06f1f4e82cbd2d65f6a044c.zip |
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.c | 6 |
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) if (this_cpu->c_identify) this_cpu->c_identify(c); + /* Clear/Set all flags overriden by options, after probe */ + for (i = 0; i < NCAPINTS; i++) { + c->x86_capability[i] &= ~cpu_caps_cleared[i]; + c->x86_capability[i] |= cpu_caps_set[i]; + } + #ifdef CONFIG_X86_64 c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); #endif |