aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/amd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-20 15:03:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-20 15:03:57 -0500
commit2a0fede97fd52a5c9789d1d54ebd3b46878151c3 (patch)
treea0a1f5bdc25491414df20ff90785ca14e3929cc3 /arch/x86/kernel/cpu/amd.c
parent06bc0f4a2e7fe54d98539686f070ceccfd73953d (diff)
parentd139336700a5f3a560da235e4dfcd286773025d4 (diff)
Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Ingo Molnar: "Misc cleanups" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, cpu, amd: Fix a shadowed variable situation um, x86: Fix vDSO build x86: Delete non-required instances of include <linux/init.h> x86, realmode: Pointer walk cleanups, pull out invariant use of __pa() x86/traps: Clean up error exception handler definitions
Diffstat (limited to 'arch/x86/kernel/cpu/amd.c')
-rw-r--r--arch/x86/kernel/cpu/amd.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 8bc79cddd9a2..525712c7ffa2 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -1,5 +1,4 @@
1#include <linux/export.h> 1#include <linux/export.h>
2#include <linux/init.h>
3#include <linux/bitops.h> 2#include <linux/bitops.h>
4#include <linux/elf.h> 3#include <linux/elf.h>
5#include <linux/mm.h> 4#include <linux/mm.h>
@@ -790,14 +789,10 @@ static void cpu_detect_tlb_amd(struct cpuinfo_x86 *c)
790 } 789 }
791 790
792 /* 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 */
793 if (!((eax >> 16) & mask)) { 792 if (!((eax >> 16) & mask))
794 u32 a, b, c, d; 793 tlb_lld_2m[ENTRIES] = (cpuid_eax(0x80000005) >> 16) & 0xff;
795 794 else
796 cpuid(0x80000005, &a, &b, &c, &d);
797 tlb_lld_2m[ENTRIES] = (a >> 16) & 0xff;
798 } else {
799 tlb_lld_2m[ENTRIES] = (eax >> 16) & mask; 795 tlb_lld_2m[ENTRIES] = (eax >> 16) & mask;
800 }
801 796
802 /* a 4M entry uses two 2M entries */ 797 /* a 4M entry uses two 2M entries */
803 tlb_lld_4m[ENTRIES] = tlb_lld_2m[ENTRIES] >> 1; 798 tlb_lld_4m[ENTRIES] = tlb_lld_2m[ENTRIES] >> 1;