diff options
Diffstat (limited to 'arch/i386/kernel/cpu/amd.c')
-rw-r--r-- | arch/i386/kernel/cpu/amd.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index ae94585d0445..fa10d0a509c7 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c | |||
@@ -188,6 +188,13 @@ static void __init init_amd(struct cpuinfo_x86 *c) | |||
188 | } | 188 | } |
189 | 189 | ||
190 | display_cacheinfo(c); | 190 | display_cacheinfo(c); |
191 | |||
192 | if (cpuid_eax(0x80000000) >= 0x80000008) { | ||
193 | c->x86_num_cores = (cpuid_ecx(0x80000008) & 0xff) + 1; | ||
194 | if (c->x86_num_cores & (c->x86_num_cores - 1)) | ||
195 | c->x86_num_cores = 1; | ||
196 | } | ||
197 | |||
191 | detect_ht(c); | 198 | detect_ht(c); |
192 | 199 | ||
193 | #ifdef CONFIG_X86_HT | 200 | #ifdef CONFIG_X86_HT |
@@ -199,12 +206,6 @@ static void __init init_amd(struct cpuinfo_x86 *c) | |||
199 | if (cpu_has(c, X86_FEATURE_CMP_LEGACY)) | 206 | if (cpu_has(c, X86_FEATURE_CMP_LEGACY)) |
200 | smp_num_siblings = 1; | 207 | smp_num_siblings = 1; |
201 | #endif | 208 | #endif |
202 | |||
203 | if (cpuid_eax(0x80000000) >= 0x80000008) { | ||
204 | c->x86_num_cores = (cpuid_ecx(0x80000008) & 0xff) + 1; | ||
205 | if (c->x86_num_cores & (c->x86_num_cores - 1)) | ||
206 | c->x86_num_cores = 1; | ||
207 | } | ||
208 | } | 209 | } |
209 | 210 | ||
210 | static unsigned int amd_size_cache(struct cpuinfo_x86 * c, unsigned int size) | 211 | static unsigned int amd_size_cache(struct cpuinfo_x86 * c, unsigned int size) |