aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/amd.c
diff options
context:
space:
mode:
authorAndreas Herrmann <andreas.herrmann3@amd.com>2012-10-19 04:59:33 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2012-11-13 14:22:29 -0500
commit04a1541828ea223169eb44a336bfad8ec0dfb46a (patch)
treea670df6305266009a488f52ad763eb5a13767abf /arch/x86/kernel/cpu/amd.c
parent193f3fcb3ab769bab4a2b9fa181eef3e5699a352 (diff)
x86, cacheinfo: Determine number of cache leafs using CPUID 0x8000001d on AMD
CPUID 0x8000001d works quite similar to Intels' CPUID function 4. Use it to determine number of cache leafs. Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Link: http://lkml.kernel.org/r/20121019085933.GE26718@alberich Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/cpu/amd.c')
-rw-r--r--arch/x86/kernel/cpu/amd.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 64e9ad4e49a0..a8538e6d2ff2 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -643,12 +643,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
643 detect_ht(c); 643 detect_ht(c);
644#endif 644#endif
645 645
646 if (c->extended_cpuid_level >= 0x80000006) { 646 init_amd_cacheinfo(c);
647 if (cpuid_edx(0x80000006) & 0xf000)
648 num_cache_leaves = 4;
649 else
650 num_cache_leaves = 3;
651 }
652 647
653 if (c->x86 >= 0xf) 648 if (c->x86 >= 0xf)
654 set_cpu_cap(c, X86_FEATURE_K8); 649 set_cpu_cap(c, X86_FEATURE_K8);