summaryrefslogtreecommitdiff
path: root/arch/i386/kernel/cpu/amd.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-19 11:54:00 +0100
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-19 11:54:00 +0100
commit7063e6c717f6108c4b3fc3135a516c86ef944870 (patch)
treeec6eec10b4dc93474100e6e366df028bd3314fda /arch/i386/kernel/cpu/amd.c
parent7ca0026495dbb644b4e32ede76be44072cb2bc7a (diff)
parent05d3794aa8bd3b2c9f7920a05003c331cdeb75c5 (diff)
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/i386/kernel/cpu/amd.c')
-rw-r--r--arch/i386/kernel/cpu/amd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c
index 16dbc4151be..fa34a06c0d7 100644
--- a/arch/i386/kernel/cpu/amd.c
+++ b/arch/i386/kernel/cpu/amd.c
@@ -24,9 +24,6 @@ __asm__(".align 4\nvide: ret");
static void __init init_amd(struct cpuinfo_x86 *c)
{
-#ifdef CONFIG_X86_SMP
- int cpu = c == &boot_cpu_data ? 0 : c - cpu_data;
-#endif
u32 l, h;
int mbytes = num_physpages >> (20-PAGE_SHIFT);
int r;
@@ -205,7 +202,9 @@ static void __init init_amd(struct cpuinfo_x86 *c)
* of two.
*/
if (c->x86_num_cores > 1) {
- cpu_core_id[cpu] = cpu >> hweight32(c->x86_num_cores - 1);
+ int cpu = smp_processor_id();
+ /* Fix up the APIC ID following AMD specifications. */
+ cpu_core_id[cpu] >>= hweight32(c->x86_num_cores - 1);
printk(KERN_INFO "CPU %d(%d) -> Core %d\n",
cpu, c->x86_num_cores, cpu_core_id[cpu]);
}