summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/intel.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-05-15 13:05:16 -0700
committerIngo Molnar <mingo@elte.hu>2009-05-18 08:43:25 +0200
commit2759c3287de27266e06f1f4e82cbd2d65f6a044c (patch)
tree78fa6a205d2e1c5f010f62e2ad50a181df1e5f47 /arch/x86/kernel/cpu/intel.c
parente5198075c67a22ec9a09565b1ce88d3d3f5ba855 (diff)
downloadop-kernel-dev-2759c3287de27266e06f1f4e82cbd2d65f6a044c.zip
op-kernel-dev-2759c3287de27266e06f1f4e82cbd2d65f6a044c.tar.gz
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/intel.c')
-rw-r--r--arch/x86/kernel/cpu/intel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 7437fa1..daed39b 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -229,12 +229,12 @@ static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c)
}
#endif
-static void __cpuinit srat_detect_node(void)
+static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
{
#if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
unsigned node;
int cpu = smp_processor_id();
- int apicid = hard_smp_processor_id();
+ int apicid = cpu_has_apic ? hard_smp_processor_id() : c->apicid;
/* Don't do the funky fallback heuristics the AMD version employs
for now. */
@@ -400,7 +400,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
}
/* Work around errata */
- srat_detect_node();
+ srat_detect_node(c);
if (cpu_has(c, X86_FEATURE_VMX))
detect_vmx_virtcap(c);
OpenPOWER on IntegriCloud