diff options
author | Steve French <sfrench@hera.kernel.org> | 2005-05-31 23:32:44 +0200 |
---|---|---|
committer | Steve French <sfrench@hera.kernel.org> | 2005-05-31 23:32:44 +0200 |
commit | af6f5e3247a68074e384ef93c0b4bce1b73c9d80 (patch) | |
tree | 87b0f1e48bd0ca67a78fab0fa42b37864863fdfd /arch/i386/kernel/cpu/amd.c | |
parent | Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2... (diff) | |
parent | Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/aegl/lin... (diff) | |
download | linux-af6f5e3247a68074e384ef93c0b4bce1b73c9d80.tar.xz linux-af6f5e3247a68074e384ef93c0b4bce1b73c9d80.zip |
Merge with rsync://rsync.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.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index fa34a06c0d79..73aeaf5a9d4e 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c @@ -195,7 +195,7 @@ static void __init init_amd(struct cpuinfo_x86 *c) c->x86_num_cores = 1; } -#ifdef CONFIG_X86_SMP +#ifdef CONFIG_X86_HT /* * On a AMD dual core setup the lower bits of the APIC id * distingush the cores. Assumes number of cores is a power @@ -203,8 +203,11 @@ static void __init init_amd(struct cpuinfo_x86 *c) */ if (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); + unsigned bits = 0; + while ((1 << bits) < c->x86_num_cores) + bits++; + cpu_core_id[cpu] = phys_proc_id[cpu] & ((1<<bits)-1); + phys_proc_id[cpu] >>= bits; printk(KERN_INFO "CPU %d(%d) -> Core %d\n", cpu, c->x86_num_cores, cpu_core_id[cpu]); } |