Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191484
b: refs/heads/master
c: b1ab1b4
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov authored and H. Peter Anvin committed Apr 23, 2010
1 parent 7112cf4 commit 57d4b0d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6dad2a29646ce3792c40cfc52d77e9b65a7bb143
refs/heads/master: b1ab1b4d9ab9812c77843abec79030292ef0a544
17 changes: 10 additions & 7 deletions trunk/arch/x86/kernel/cpu/intel_cacheinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,18 +328,22 @@ static unsigned int __cpuinit amd_calc_l3_indices(void)
static void __cpuinit
amd_check_l3_disable(int index, struct _cpuid4_info_regs *this_leaf)
{
if (index < 3)
if (boot_cpu_data.x86 != 0x10)
return;

if (boot_cpu_data.x86 == 0x11)
if (index < 3)
return;

/* see errata #382 and #388 */
if ((boot_cpu_data.x86 == 0x10) &&
((boot_cpu_data.x86_model < 0x8) ||
(boot_cpu_data.x86_mask < 0x1)))
if (boot_cpu_data.x86_model < 0x8)
return;

if ((boot_cpu_data.x86_model == 0x8 ||
boot_cpu_data.x86_model == 0x9)
&&
boot_cpu_data.x86_mask < 0x1)
return;

this_leaf->can_disable = true;
this_leaf->l3_indices = amd_calc_l3_indices();
}
Expand Down Expand Up @@ -443,8 +447,7 @@ __cpuinit cpuid4_cache_lookup_regs(int index,

if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
amd_cpuid4(index, &eax, &ebx, &ecx);
if (boot_cpu_data.x86 >= 0x10)
amd_check_l3_disable(index, this_leaf);
amd_check_l3_disable(index, this_leaf);
} else {
cpuid_count(4, index, &eax.full, &ebx.full, &ecx.full, &edx);
}
Expand Down

0 comments on commit 57d4b0d

Please sign in to comment.