summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds2016-09-04 17:45:41 +0200
committerLinus Torvalds2016-09-04 17:45:41 +0200
commit9ca581b50dab6103183396852cc08e440fcda18e (patch)
tree029775bfe0ce0adcce7f0dd7f1ca8f98efe1768c
parentMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/... (diff)
parentx86/AMD: Apply erratum 665 on machines without a BIOS fix (diff)
downloadkernel-qcow2-linux-9ca581b50dab6103183396852cc08e440fcda18e.tar.gz
kernel-qcow2-linux-9ca581b50dab6103183396852cc08e440fcda18e.tar.xz
kernel-qcow2-linux-9ca581b50dab6103183396852cc08e440fcda18e.zip
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Thomas Gleixner: "A single fix for an AMD erratum so machines without a BIOS fix work" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/AMD: Apply erratum 665 on machines without a BIOS fix
-rw-r--r--arch/x86/kernel/cpu/amd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index f5c69d8974e1..b81fe2d63e15 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -669,6 +669,17 @@ static void init_amd_gh(struct cpuinfo_x86 *c)
set_cpu_bug(c, X86_BUG_AMD_TLB_MMATCH);
}
+#define MSR_AMD64_DE_CFG 0xC0011029
+
+static void init_amd_ln(struct cpuinfo_x86 *c)
+{
+ /*
+ * Apply erratum 665 fix unconditionally so machines without a BIOS
+ * fix work.
+ */
+ msr_set_bit(MSR_AMD64_DE_CFG, 31);
+}
+
static void init_amd_bd(struct cpuinfo_x86 *c)
{
u64 value;
@@ -726,6 +737,7 @@ static void init_amd(struct cpuinfo_x86 *c)
case 6: init_amd_k7(c); break;
case 0xf: init_amd_k8(c); break;
case 0x10: init_amd_gh(c); break;
+ case 0x12: init_amd_ln(c); break;
case 0x15: init_amd_bd(c); break;
}