diff options
-rw-r--r-- | arch/x86/kernel/cpu/amd.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 39bc78dad377..e5647ab5fc23 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -789,14 +789,10 @@ static void cpu_detect_tlb_amd(struct cpuinfo_x86 *c) | |||
789 | } | 789 | } |
790 | 790 | ||
791 | /* Handle DTLB 2M and 4M sizes, fall back to L1 if L2 is disabled */ | 791 | /* Handle DTLB 2M and 4M sizes, fall back to L1 if L2 is disabled */ |
792 | if (!((eax >> 16) & mask)) { | 792 | if (!((eax >> 16) & mask)) |
793 | u32 a, b, c, d; | 793 | tlb_lld_2m[ENTRIES] = (cpuid_eax(0x80000005) >> 16) & 0xff; |
794 | 794 | else | |
795 | cpuid(0x80000005, &a, &b, &c, &d); | ||
796 | tlb_lld_2m[ENTRIES] = (a >> 16) & 0xff; | ||
797 | } else { | ||
798 | tlb_lld_2m[ENTRIES] = (eax >> 16) & mask; | 795 | tlb_lld_2m[ENTRIES] = (eax >> 16) & mask; |
799 | } | ||
800 | 796 | ||
801 | /* a 4M entry uses two 2M entries */ | 797 | /* a 4M entry uses two 2M entries */ |
802 | tlb_lld_4m[ENTRIES] = tlb_lld_2m[ENTRIES] >> 1; | 798 | tlb_lld_4m[ENTRIES] = tlb_lld_2m[ENTRIES] >> 1; |