diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:51:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:51:09 -0400 |
commit | 81a07d7588d376c530d006e24d7981304ce96e16 (patch) | |
tree | 1608e094c88b9702c86cf2e6f65339aab9ea3f3f /arch/i386/kernel/cpu/amd.c | |
parent | 8871e73fdbde07d0a41393f7ee30787b65387b36 (diff) | |
parent | 8501a2fbe762b21d2504ed3aca3b52be61b5e6e4 (diff) |
Merge branch 'x86-64'
* x86-64: (83 commits)
[PATCH] x86_64: x86_64 stack usage debugging
[PATCH] x86_64: (resend) x86_64 stack overflow debugging
[PATCH] x86_64: msi_apic.c build fix
[PATCH] x86_64: i386/x86-64 Add nmi watchdog support for new Intel CPUs
[PATCH] x86_64: Avoid broadcasting NMI IPIs
[PATCH] x86_64: fix apic error on bootup
[PATCH] x86_64: enlarge window for stack growth
[PATCH] x86_64: Minor string functions optimizations
[PATCH] x86_64: Move export symbols to their C functions
[PATCH] x86_64: Standardize i386/x86_64 handling of NMI_VECTOR
[PATCH] x86_64: Fix modular pc speaker
[PATCH] x86_64: remove sys32_ni_syscall()
[PATCH] x86_64: Do not use -ffunction-sections for modules
[PATCH] x86_64: Add cpu_relax to apic_wait_icr_idle
[PATCH] x86_64: adjust kstack_depth_to_print default
[PATCH] i386/x86-64: adjust /proc/interrupts column headings
[PATCH] x86_64: Fix race in cpu_local_* on preemptible kernels
[PATCH] x86_64: Fix fast check in safe_smp_processor_id
[PATCH] x86_64: x86_64 setup.c - printing cmp related boottime information
[PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status
...
Manual resolve of trivial conflict in arch/i386/kernel/Makefile
Diffstat (limited to 'arch/i386/kernel/cpu/amd.c')
-rw-r--r-- | arch/i386/kernel/cpu/amd.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index 786d1a57048b..fd0457c9c827 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c | |||
@@ -224,15 +224,17 @@ static void __init init_amd(struct cpuinfo_x86 *c) | |||
224 | 224 | ||
225 | #ifdef CONFIG_X86_HT | 225 | #ifdef CONFIG_X86_HT |
226 | /* | 226 | /* |
227 | * On a AMD dual core setup the lower bits of the APIC id | 227 | * On a AMD multi core setup the lower bits of the APIC id |
228 | * distingush the cores. Assumes number of cores is a power | 228 | * distingush the cores. |
229 | * of two. | ||
230 | */ | 229 | */ |
231 | if (c->x86_max_cores > 1) { | 230 | if (c->x86_max_cores > 1) { |
232 | int cpu = smp_processor_id(); | 231 | int cpu = smp_processor_id(); |
233 | unsigned bits = 0; | 232 | unsigned bits = (cpuid_ecx(0x80000008) >> 12) & 0xf; |
234 | while ((1 << bits) < c->x86_max_cores) | 233 | |
235 | bits++; | 234 | if (bits == 0) { |
235 | while ((1 << bits) < c->x86_max_cores) | ||
236 | bits++; | ||
237 | } | ||
236 | cpu_core_id[cpu] = phys_proc_id[cpu] & ((1<<bits)-1); | 238 | cpu_core_id[cpu] = phys_proc_id[cpu] & ((1<<bits)-1); |
237 | phys_proc_id[cpu] >>= bits; | 239 | phys_proc_id[cpu] >>= bits; |
238 | printk(KERN_INFO "CPU %d(%d) -> Core %d\n", | 240 | printk(KERN_INFO "CPU %d(%d) -> Core %d\n", |
@@ -240,6 +242,8 @@ static void __init init_amd(struct cpuinfo_x86 *c) | |||
240 | } | 242 | } |
241 | #endif | 243 | #endif |
242 | 244 | ||
245 | if (cpuid_eax(0x80000000) >= 0x80000006) | ||
246 | num_cache_leaves = 3; | ||
243 | } | 247 | } |
244 | 248 | ||
245 | static unsigned int amd_size_cache(struct cpuinfo_x86 * c, unsigned int size) | 249 | static unsigned int amd_size_cache(struct cpuinfo_x86 * c, unsigned int size) |