From: tip-bot for Joerg Roedel <joerg.roedel@amd.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
joerg.roedel@amd.com, stable@kernel.org,
alexandre.f.demers@gmail.com, tglx@linutronix.de,
hpa@linux.intel.com
Subject: [tip:x86/urgent] x86, amd: Disable GartTlbWlkErr when BIOS forgets it
Date: Sat, 16 Apr 2011 00:03:57 GMT [thread overview]
Message-ID: <tip-5bbc097d890409d8eff4e3f1d26f11a9d6b7c07e@git.kernel.org> (raw)
In-Reply-To: <20110415131152.GJ18463@8bytes.org>
Commit-ID: 5bbc097d890409d8eff4e3f1d26f11a9d6b7c07e
Gitweb: http://git.kernel.org/tip/5bbc097d890409d8eff4e3f1d26f11a9d6b7c07e
Author: Joerg Roedel <joerg.roedel@amd.com>
AuthorDate: Fri, 15 Apr 2011 14:47:40 +0200
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 15 Apr 2011 16:03:16 -0700
x86, amd: Disable GartTlbWlkErr when BIOS forgets it
This patch disables GartTlbWlk errors on AMD Fam10h CPUs if
the BIOS forgets to do is (or is just too old). Letting
these errors enabled can cause a sync-flood on the CPU
causing a reboot.
The AMD BKDG recommends disabling GART TLB Wlk Error completely.
This patch is the fix for
https://bugzilla.kernel.org/show_bug.cgi?id=33012
on my machine.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Link: http://lkml.kernel.org/r/20110415131152.GJ18463@8bytes.org
Tested-by: Alexandre Demers <alexandre.f.demers@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/include/asm/msr-index.h | 4 ++++
arch/x86/kernel/cpu/amd.c | 19 +++++++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index fd5a1f3..3cce714 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -96,11 +96,15 @@
#define MSR_IA32_MC0_ADDR 0x00000402
#define MSR_IA32_MC0_MISC 0x00000403
+#define MSR_AMD64_MC0_MASK 0xc0010044
+
#define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x))
#define MSR_IA32_MCx_STATUS(x) (MSR_IA32_MC0_STATUS + 4*(x))
#define MSR_IA32_MCx_ADDR(x) (MSR_IA32_MC0_ADDR + 4*(x))
#define MSR_IA32_MCx_MISC(x) (MSR_IA32_MC0_MISC + 4*(x))
+#define MSR_AMD64_MCx_MASK(x) (MSR_AMD64_MC0_MASK + (x))
+
/* These are consecutive and not in the normal 4er MCE bank block */
#define MSR_IA32_MC0_CTL2 0x00000280
#define MSR_IA32_MCx_CTL2(x) (MSR_IA32_MC0_CTL2 + (x))
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 3ecece0..3532d3b 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -615,6 +615,25 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
/* As a rule processors have APIC timer running in deep C states */
if (c->x86 >= 0xf && !cpu_has_amd_erratum(amd_erratum_400))
set_cpu_cap(c, X86_FEATURE_ARAT);
+
+ /*
+ * Disable GART TLB Walk Errors on Fam10h. We do this here
+ * because this is always needed when GART is enabled, even in a
+ * kernel which has no MCE support built in.
+ */
+ if (c->x86 == 0x10) {
+ /*
+ * BIOS should disable GartTlbWlk Errors themself. If
+ * it doesn't do it here as suggested by the BKDG.
+ *
+ * Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=33012
+ */
+ u64 mask;
+
+ rdmsrl(MSR_AMD64_MCx_MASK(4), mask);
+ mask |= (1 << 10);
+ wrmsrl(MSR_AMD64_MCx_MASK(4), mask);
+ }
}
#ifdef CONFIG_X86_32
next prev parent reply other threads:[~2011-04-16 0:04 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-12 0:40 Linux 2.6.39-rc3 Linus Torvalds
2011-04-12 9:02 ` Joerg Roedel
2011-04-12 14:15 ` Alex Deucher
2011-04-12 18:44 ` Joerg Roedel
2011-04-13 1:27 ` David Rientjes
2011-04-13 6:46 ` Ingo Molnar
2011-04-13 17:21 ` Joerg Roedel
2011-04-13 18:39 ` H. Peter Anvin
2011-04-13 19:26 ` Joerg Roedel
2011-04-13 18:51 ` H. Peter Anvin
2011-04-13 19:24 ` Joerg Roedel
2011-04-13 19:14 ` Yinghai Lu
2011-04-13 19:34 ` Joerg Roedel
2011-04-13 20:48 ` Yinghai Lu
2011-04-13 20:54 ` Linus Torvalds
2011-04-13 21:23 ` Yinghai Lu
2011-04-13 23:39 ` Linus Torvalds
2011-04-14 0:10 ` Yinghai Lu
2011-04-14 2:03 ` H. Peter Anvin
2011-04-14 2:27 ` Linus Torvalds
2011-04-14 2:33 ` Linus Torvalds
2011-04-14 4:03 ` Tejun Heo
2011-04-14 9:36 ` Joerg Roedel
2011-04-14 8:09 ` Alan Cox
2011-04-15 13:11 ` Joerg Roedel
2011-04-15 13:16 ` Ingo Molnar
2011-04-15 14:33 ` Joerg Roedel
2011-04-15 16:11 ` Alex Deucher
2011-04-15 15:46 ` Joerg Roedel
2011-04-15 16:11 ` Jerome Glisse
2011-04-16 16:35 ` Joerg Roedel
2011-04-16 18:54 ` Jerome Glisse
2011-04-17 14:09 ` Joerg Roedel
2011-04-18 1:12 ` Jerome Glisse
2011-04-18 15:23 ` Alex Deucher
2011-04-18 15:29 ` Jerome Glisse
2011-04-18 15:33 ` Alex Deucher
2011-04-18 15:59 ` Jerome Glisse
2011-04-18 16:35 ` Alex Deucher
2011-04-15 14:04 ` Andreas Herrmann
2011-04-15 14:28 ` Joerg Roedel
2011-04-15 14:16 ` Alexandre Demers
2011-04-15 14:27 ` Joerg Roedel
2011-04-15 18:59 ` Alexandre Demers
2011-04-15 19:06 ` Ingo Molnar
2011-04-15 19:18 ` Yinghai Lu
2011-04-15 20:22 ` H. Peter Anvin
2011-04-16 12:01 ` Joerg Roedel
2011-04-16 12:00 ` Joerg Roedel
2011-04-16 12:21 ` Ingo Molnar
2011-04-16 0:03 ` tip-bot for Joerg Roedel [this message]
2011-05-06 21:17 ` Linus Torvalds
2011-04-13 21:50 ` Joerg Roedel
2011-04-13 21:59 ` Yinghai Lu
2011-04-13 22:11 ` H. Peter Anvin
2011-04-13 22:01 ` H. Peter Anvin
2011-04-13 22:22 ` Joerg Roedel
2011-04-13 22:31 ` H. Peter Anvin
2011-04-14 8:59 ` Joerg Roedel
2011-04-13 19:48 ` Alex Deucher
2011-04-14 1:58 ` H. Peter Anvin
2011-04-14 2:07 ` Dave Airlie
2011-04-14 6:10 ` H. Peter Anvin
2011-04-14 8:56 ` Joerg Roedel
2011-04-14 9:07 ` Dave Airlie
2011-04-14 9:11 ` Ingo Molnar
2011-04-14 14:31 ` H. Peter Anvin
2011-04-14 14:28 ` Alex Deucher
2011-04-14 21:09 ` Joerg Roedel
2011-04-14 21:34 ` Alex Deucher
2011-04-15 6:50 ` Joerg Roedel
2011-04-15 14:49 ` Andreas Herrmann
2011-04-15 8:26 ` Michel Dänzer
2011-04-15 8:55 ` Joerg Roedel
2011-04-12 19:09 ` Dave Jones
2011-04-12 19:21 ` Dave Jones
2011-04-12 19:55 ` Linus Torvalds
2011-04-12 20:13 ` Dave Jones
2011-04-14 8:20 ` Aneesh Kumar K.V
2011-04-18 22:57 ` Kay Sievers
2011-04-18 23:02 ` Dave Jones
2011-04-18 23:14 ` Kay Sievers
2011-04-19 11:42 ` Ted Ts'o
2011-04-19 8:23 ` Aneesh Kumar K.V
2011-04-19 8:37 ` Steven Whitehouse
2011-04-19 9:55 ` Kay Sievers
2011-04-12 20:20 ` Eric Sandeen
2011-04-12 20:27 ` Karel Zak
2011-04-12 20:33 ` Linus Torvalds
2011-04-14 20:24 ` Borislav Petkov
2011-04-14 20:55 ` Linus Torvalds
2011-04-15 4:14 ` Christoph Hellwig
2011-04-20 20:12 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-5bbc097d890409d8eff4e3f1d26f11a9d6b7c07e@git.kernel.org \
--to=joerg.roedel@amd.com \
--cc=alexandre.f.demers@gmail.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).