aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/setup_64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index d65b73e63384..f303c70dd688 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -564,7 +564,7 @@ static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c)
564 /* Low order bits define the core id (index of core in socket) */ 564 /* Low order bits define the core id (index of core in socket) */
565 c->cpu_core_id = c->phys_proc_id & ((1 << bits)-1); 565 c->cpu_core_id = c->phys_proc_id & ((1 << bits)-1);
566 /* Convert the APIC ID into the socket ID */ 566 /* Convert the APIC ID into the socket ID */
567 c->phys_proc_id = phys_pkg_id(bits); 567 c->phys_proc_id = (c->apicid - boot_cpu_id) >> bits;
568 568
569#ifdef CONFIG_NUMA 569#ifdef CONFIG_NUMA
570 node = c->phys_proc_id; 570 node = c->phys_proc_id;
@@ -581,7 +581,7 @@ static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c)
581 If that doesn't result in a usable node fall back to the 581 If that doesn't result in a usable node fall back to the
582 path for the previous case. */ 582 path for the previous case. */
583 583
584 int ht_nodeid = apicid - (cpu_data(0).phys_proc_id << bits); 584 int ht_nodeid = apicid - boot_cpu_id;
585 585
586 if (ht_nodeid >= 0 && 586 if (ht_nodeid >= 0 &&
587 apicid_to_node[ht_nodeid] != NUMA_NO_NODE) 587 apicid_to_node[ht_nodeid] != NUMA_NO_NODE)