diff options
author | Andreas Herrmann <andreas.herrmann3@amd.com> | 2009-04-09 09:47:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-10 09:41:18 -0400 |
commit | 6265ff19ca08df0d96c859ae5e4dc2d9ad07070e (patch) | |
tree | 02ce11eaa0d181db68ba992d8e852ba89125b2e7 /arch/x86 | |
parent | 2fad2d9bb8310889f3261035b594b4e068b6eb8b (diff) |
x86: cacheinfo: complete L2/L3 Cache and TLB associativity field definitions
See "CPUID Specification" (AMD Publication #: 25481, Rev. 2.28, April 2008)
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Mark Langsdorf <mark.langsdorf@amd.com>
LKML-Reference: <20090409134710.GA8026@alberich.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index d46a849f44a8..789efe217e1a 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -200,10 +200,17 @@ union l3_cache { | |||
200 | }; | 200 | }; |
201 | 201 | ||
202 | static const unsigned short __cpuinitconst assocs[] = { | 202 | static const unsigned short __cpuinitconst assocs[] = { |
203 | [1] = 1, [2] = 2, [4] = 4, [6] = 8, | 203 | [1] = 1, |
204 | [8] = 16, [0xa] = 32, [0xb] = 48, | 204 | [2] = 2, |
205 | [4] = 4, | ||
206 | [6] = 8, | ||
207 | [8] = 16, | ||
208 | [0xa] = 32, | ||
209 | [0xb] = 48, | ||
205 | [0xc] = 64, | 210 | [0xc] = 64, |
206 | [0xf] = 0xffff // ?? | 211 | [0xd] = 96, |
212 | [0xe] = 128, | ||
213 | [0xf] = 0xffff /* fully associative - no way to show this currently */ | ||
207 | }; | 214 | }; |
208 | 215 | ||
209 | static const unsigned char __cpuinitconst levels[] = { 1, 1, 2, 3 }; | 216 | static const unsigned char __cpuinitconst levels[] = { 1, 1, 2, 3 }; |
@@ -264,7 +271,8 @@ amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax, | |||
264 | eax->split.type = types[leaf]; | 271 | eax->split.type = types[leaf]; |
265 | eax->split.level = levels[leaf]; | 272 | eax->split.level = levels[leaf]; |
266 | if (leaf == 3) | 273 | if (leaf == 3) |
267 | eax->split.num_threads_sharing = current_cpu_data.x86_max_cores - 1; | 274 | eax->split.num_threads_sharing = |
275 | current_cpu_data.x86_max_cores - 1; | ||
268 | else | 276 | else |
269 | eax->split.num_threads_sharing = 0; | 277 | eax->split.num_threads_sharing = 0; |
270 | eax->split.num_cores_on_die = current_cpu_data.x86_max_cores - 1; | 278 | eax->split.num_cores_on_die = current_cpu_data.x86_max_cores - 1; |