diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-05-15 16:05:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-18 02:43:25 -0400 |
commit | 2759c3287de27266e06f1f4e82cbd2d65f6a044c (patch) | |
tree | 78fa6a205d2e1c5f010f62e2ad50a181df1e5f47 /arch/x86/kernel/cpu/amd.c | |
parent | e5198075c67a22ec9a09565b1ce88d3d3f5ba855 (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/amd.c')
-rw-r--r-- | arch/x86/kernel/cpu/amd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 7e4a459daa64..728b3750a3e8 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -272,7 +272,7 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c) | |||
272 | #if defined(CONFIG_NUMA) && defined(CONFIG_X86_64) | 272 | #if defined(CONFIG_NUMA) && defined(CONFIG_X86_64) |
273 | int cpu = smp_processor_id(); | 273 | int cpu = smp_processor_id(); |
274 | int node; | 274 | int node; |
275 | unsigned apicid = hard_smp_processor_id(); | 275 | unsigned apicid = cpu_has_apic ? hard_smp_processor_id() : c->apicid; |
276 | 276 | ||
277 | node = c->phys_proc_id; | 277 | node = c->phys_proc_id; |
278 | if (apicid_to_node[apicid] != NUMA_NO_NODE) | 278 | if (apicid_to_node[apicid] != NUMA_NO_NODE) |