From 81c069b66fdb2fa2d460cee0f8231a219e40cbf7 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Thu, 6 Mar 2008 01:11:11 -0800 Subject: [PATCH] --- yaml --- r: 88751 b: refs/heads/master c: a7062211865efb53cda253d6e33a106f0fe20ebe h: refs/heads/master i: 88749: 092360bfce73ff1cc2e465a3b191e1b18d9b337f 88747: a10506172261c4835d6706ae0bf7285ff8de8672 88743: 9c8ed22c844cb1d0815e4d0907b51915096d958c 88735: ee3c3366249cfdb8c70ab047a312c3e22755a77b v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/setup_64.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 8409813ef123..1368ead7df55 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 97b44ae6cd8117212d41bedc433b5571ee3b79d9 +refs/heads/master: a7062211865efb53cda253d6e33a106f0fe20ebe diff --git a/trunk/arch/x86/kernel/setup_64.c b/trunk/arch/x86/kernel/setup_64.c index d65b73e63384..f303c70dd688 100644 --- a/trunk/arch/x86/kernel/setup_64.c +++ b/trunk/arch/x86/kernel/setup_64.c @@ -564,7 +564,7 @@ static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c) /* Low order bits define the core id (index of core in socket) */ c->cpu_core_id = c->phys_proc_id & ((1 << bits)-1); /* Convert the APIC ID into the socket ID */ - c->phys_proc_id = phys_pkg_id(bits); + c->phys_proc_id = (c->apicid - boot_cpu_id) >> bits; #ifdef CONFIG_NUMA node = c->phys_proc_id; @@ -581,7 +581,7 @@ static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c) If that doesn't result in a usable node fall back to the path for the previous case. */ - int ht_nodeid = apicid - (cpu_data(0).phys_proc_id << bits); + int ht_nodeid = apicid - boot_cpu_id; if (ht_nodeid >= 0 && apicid_to_node[ht_nodeid] != NUMA_NO_NODE)