summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/setup.c
diff options
context:
space:
mode:
authorAndi Kleen2006-06-26 13:56:13 +0200
committerLinus Torvalds2006-06-26 19:48:14 +0200
commit240cd6a80642da528bfa382ec2ae4e3cb8991ea7 (patch)
tree6c24052ea167a2fd7e0be93c167e9e7da5bddd2b /arch/x86_64/kernel/setup.c
parent[PATCH] i386/x86-64: Use new official CPUID to get APICID/core split on AMD p... (diff)
downloadkernel-qcow2-linux-240cd6a80642da528bfa382ec2ae4e3cb8991ea7.tar.gz
kernel-qcow2-linux-240cd6a80642da528bfa382ec2ae4e3cb8991ea7.tar.xz
kernel-qcow2-linux-240cd6a80642da528bfa382ec2ae4e3cb8991ea7.zip
[PATCH] i386/x86-64: Emulate CPUID4 on AMD
Intel systems report the cache level data from CPUID 4 in sysfs. Add a CPUID 4 emulation for AMD CPUs to report the same information for them. This allows programs to read this information in a uniform way. The AMD way to report this is less flexible so some assumptions are hardcoded (e.g. no L3) Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/setup.c')
-rw-r--r--arch/x86_64/kernel/setup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index 1cb3e21c571a..4b7e02216970 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -976,6 +976,9 @@ static int __init init_amd(struct cpuinfo_x86 *c)
if (c->extended_cpuid_level >= 0x80000008)
amd_detect_cmp(c);
+ /* Fix cpuid4 emulation for more */
+ num_cache_leaves = 3;
+
return r;
}