mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: joerg.roedel@amd.com, ak@linux.intel.com,
	alexandre.f.demers@gmail.com, hpa@linux.intel.com,
	gregkh@suse.de, linux-kernel@vger.kernel.org, stable@kernel.org,
	tim.bird@am.sony.com
Subject: [PATCH] [66/106] x86, amd: Disable GartTlbWlkErr when BIOS forgets it
Date: Tue, 26 Apr 2011 14:13:47 -0700 (PDT)	[thread overview]
Message-ID: <20110426211347.3AF473E1886@tassilo.jf.intel.com> (raw)
In-Reply-To: <20110426212.641772347@firstfloor.org>

2.6.35-longterm review patch.  If anyone has any objections, please let me know.

------------------
From: Joerg Roedel <joerg.roedel@amd.com>

commit 5bbc097d890409d8eff4e3f1d26f11a9d6b7c07e upstream.

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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/20110415131152.GJ18463@8bytes.org
Tested-by: Alexandre Demers <alexandre.f.demers@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/include/asm/msr-index.h |    4 ++++
 arch/x86/kernel/cpu/amd.c        |   19 +++++++++++++++++++
 2 files changed, 23 insertions(+)

Index: linux-2.6.35.y/arch/x86/include/asm/msr-index.h
===================================================================
--- linux-2.6.35.y.orig/arch/x86/include/asm/msr-index.h
+++ linux-2.6.35.y/arch/x86/include/asm/msr-index.h
@@ -85,11 +85,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))
Index: linux-2.6.35.y/arch/x86/kernel/cpu/amd.c
===================================================================
--- linux-2.6.35.y.orig/arch/x86/kernel/cpu/amd.c
+++ linux-2.6.35.y/arch/x86/kernel/cpu/amd.c
@@ -568,6 +568,25 @@ static void __cpuinit init_amd(struct cp
 	/* 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

  parent reply	other threads:[~2011-04-26 21:27 UTC|newest]

Thread overview: 125+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 21:12 [PATCH] [0/106] 2.6.35.13 longterm review Andi Kleen
2011-04-26 21:12 ` [PATCH] [1/106] mm: page allocator: adjust the per-cpu counter threshold when memory is low Andi Kleen
2011-04-26 21:12 ` [PATCH] [2/106] qla2xxx: Make the FC port capability mutual exclusive Andi Kleen
2011-04-26 21:12 ` [PATCH] [3/106] staging: usbip: bugfixes related to kthread conversion Andi Kleen
2011-04-26 21:12 ` [PATCH] [4/106] staging: usbip: bugfix add number of packets for isochronous frames Andi Kleen
2011-04-26 21:12 ` [PATCH] [5/106] staging: usbip: bugfix for isochronous packets and optimization Andi Kleen
2011-04-26 21:12 ` [PATCH] [6/106] staging: hv: Fix GARP not sent after Quick Migration Andi Kleen
2011-04-26 21:12 ` [PATCH] [7/106] staging: hv: use sync_bitops when interacting with the hypervisor Andi Kleen
2011-04-26 21:12 ` [PATCH] [8/106] xfs: prevent leaking uninitialized stack memory in FSGEOMETRY_V1 Andi Kleen
2011-04-27  5:26   ` Dave Chinner
2011-04-27 15:00     ` Andi Kleen
2011-04-28  0:04       ` Dave Chinner
2011-04-26 21:12 ` [PATCH] [9/106] irda: validate peer name and attribute lengths Andi Kleen
2011-04-26 21:12 ` [PATCH] [10/106] irda: prevent heap corruption on invalid nickname Andi Kleen
2011-04-26 21:12 ` [PATCH] [11/106] nilfs2: fix data loss in mmap page write for hole blocks Andi Kleen
2011-04-26 21:12 ` [PATCH] [12/106] ASoC: Explicitly say registerless widgets have no register Andi Kleen
2011-04-26 21:12 ` [PATCH] [13/106] ALSA: ens1371: fix Creative Ectiva support Andi Kleen
2011-04-26 21:12 ` [PATCH] [14/106] ROSE: prevent heap corruption with bad facilities Andi Kleen
2011-04-26 21:12 ` [PATCH] [15/106] Btrfs: Fix uninitialized root flags for subvolumes Andi Kleen
2011-04-26 21:12 ` [PATCH] [16/106] x86, mtrr, pat: Fix one cpu getting out of sync during resume Andi Kleen
2011-04-26 21:12 ` [PATCH] [17/106] UBIFS: do not read flash unnecessarily Andi Kleen
2011-04-26 21:12 ` [PATCH] [18/106] UBIFS: fix oops on error path in read_pnode Andi Kleen
2011-04-26 21:12 ` [PATCH] [19/106] UBIFS: fix debugging failure in dbg_check_space_info Andi Kleen
2011-04-26 21:12 ` [PATCH] [20/106] quota: Don't write quota info in dquot_commit() Andi Kleen
2011-04-26 21:12 ` [PATCH] [21/106] mm: avoid wrapping vm_pgoff in mremap() Andi Kleen
2011-04-26 21:13 ` [PATCH] [22/106] p54usb: IDs for two new devices Andi Kleen
2011-04-26 21:13 ` [PATCH] [23/106] b43: allocate receive buffers big enough for max frame len + offset Andi Kleen
2011-04-26 21:13 ` [PATCH] [24/106] Bluetooth: sco: fix information leak to userspace Andi Kleen
2011-04-26 21:13 ` [PATCH] [25/106] bridge: netfilter: fix information leak Andi Kleen
2011-04-26 21:13 ` [PATCH] [26/106] Bluetooth: bnep: fix buffer overflow Andi Kleen
2011-04-26 21:13 ` [PATCH] [27/106] Bluetooth: add support for Apple MacBook Pro 8,2 Andi Kleen
2011-04-26 21:13 ` [PATCH] [28/106] Treat writes as new when holes span across page boundaries Andi Kleen
2011-04-26 21:13 ` [PATCH] [29/106] char/tpm: Fix unitialized usage of data buffer Andi Kleen
2011-04-26 21:13 ` [PATCH] [30/106] netfilter: ip_tables: fix infoleak to userspace Andi Kleen
2011-04-26 21:13 ` [PATCH] [31/106] netfilter: arp_tables: " Andi Kleen
2011-04-26 21:13 ` [PATCH] [32/106] netfilter: ipt_CLUSTERIP: fix buffer overflow Andi Kleen
2011-04-26 21:13 ` [PATCH] [33/106] ipv6: netfilter: ip6_tables: fix infoleak to userspace Andi Kleen
2011-04-26 21:13 ` [PATCH] [34/106] mfd: ab3100: world-writable debugfs *_priv files Andi Kleen
2011-04-26 21:13 ` [PATCH] [35/106] drivers/rtc/rtc-ds1511.c: world-writable sysfs nvram file Andi Kleen
2011-04-26 21:13 ` [PATCH] [36/106] drivers/misc/ep93xx_pwm.c: world-writable sysfs files Andi Kleen
2011-04-26 21:13 ` [PATCH] [37/106] econet: 4 byte infoleak to the network Andi Kleen
2011-04-26 21:13 ` [PATCH] [38/106] sound/oss: remove offset from load_patch callbacks Andi Kleen
2011-04-26 21:13 ` [PATCH] [39/106] sound: oss: midi_synth: check get_user() return value Andi Kleen
2011-04-26 21:13 ` [PATCH] [40/106] gro: Reset dev pointer on reuse Andi Kleen
2011-04-26 21:13 ` [PATCH] [41/106] gro: reset skb_iif " Andi Kleen
2011-04-26 21:13 ` [PATCH] [42/106] x86, microcode, AMD: Extend ucode size verification Andi Kleen
2011-04-26 22:44   ` Paul Gortmaker
2011-04-26 23:03     ` Andi Kleen
2011-04-26 21:13 ` [PATCH] [43/106] Squashfs: handle corruption of directory structure Andi Kleen
2011-04-26 21:13 ` [PATCH] [44/106] atm/solos-pci: Don't include frame pseudo-header on transmit hex-dump Andi Kleen
2011-04-26 21:13 ` [PATCH] [45/106] ext4: fix credits computing for indirect mapped files Andi Kleen
2011-04-26 21:13 ` [PATCH] [46/106] nfsd: fix auth_domain reference leak on nlm operations Andi Kleen
2011-04-26 21:13 ` [PATCH] [47/106] net: tipc: fix information leak to userland Andi Kleen
2011-04-26 21:13 ` [PATCH] [48/106] inet_diag: Make sure we actually run the same bytecode we audited Andi Kleen
2011-04-26 21:13 ` [PATCH] [49/106] irda: prevent integer underflow in IRLMP_ENUMDEVICES Andi Kleen
2011-04-26 21:13 ` [PATCH] [50/106] CAN: Use inode instead of kernel address for /proc file Andi Kleen
2011-04-26 21:13 ` [PATCH] [51/106] net: fix rds_iovec page count overflow Andi Kleen
2011-04-26 21:13 ` [PATCH] [52/106] xfs: zero proper structure size for geometry calls Andi Kleen
2011-04-26 21:13 ` [PATCH] [53/106] cifs: always do is_path_accessible check in cifs_mount Andi Kleen
2011-04-26 21:13 ` [PATCH] [54/106] video: sn9c102: world-wirtable sysfs files Andi Kleen
2011-04-26 21:13 ` [PATCH] [55/106] UBIFS: restrict world-writable debugfs files Andi Kleen
2011-04-26 21:13 ` [PATCH] [56/106] NET: cdc-phonet, handle empty phonet header Andi Kleen
2011-04-26 21:13 ` [PATCH] [57/106] x86: Fix a bogus unwind annotation in lib/semaphore_32.S Andi Kleen
2011-04-26 21:13 ` [PATCH] [58/106] tioca: Fix assignment from incompatible pointer warnings Andi Kleen
2011-04-26 21:13 ` [PATCH] [59/106] mca.c: Fix cast from integer to pointer warning Andi Kleen
2011-04-26 21:13 ` [PATCH] [60/106] ramfs: fix memleak on no-mmu arch Andi Kleen
2011-04-26 21:13 ` [PATCH] [61/106] MAINTAINERS: update STABLE BRANCH info Andi Kleen
2011-04-26 21:13 ` [PATCH] [62/106] UBIFS: fix oops when R/O file-system is fsync'ed Andi Kleen
2011-04-26 21:13 ` [PATCH] [63/106] x86, cpu: AMD errata checking framework Andi Kleen
2011-04-26 21:13 ` [PATCH] [64/106] x86, cpu: Clean up AMD erratum 400 workaround Andi Kleen
2011-04-26 21:13 ` [PATCH] [65/106] x86, AMD: Set ARAT feature on AMD processors Andi Kleen
2011-04-26 21:13 ` Andi Kleen [this message]
2011-04-26 21:13 ` [PATCH] [67/106] USB: ftdi_sio: Added IDs for CTI USB Serial Devices Andi Kleen
2011-04-26 21:13 ` [PATCH] [68/106] USB: ftdi_sio: add PID for OCT DK201 docking station Andi Kleen
2011-04-26 21:13 ` [PATCH] [69/106] USB: ftdi_sio: add ids for Hameg HO720 and HO730 Andi Kleen
2011-04-26 21:13 ` [PATCH] [70/106] USB: option: Add new ONDA vendor id and product id for ONDA MT825UP Andi Kleen
2011-04-26 21:13 ` [PATCH] [71/106] USB: option: Added support for Samsung GT-B3730/GT-B3710 LTE USB modem Andi Kleen
2011-04-26 21:13 ` [PATCH] [72/106] next_pidmap: fix overflow condition Andi Kleen
2011-04-26 21:13 ` [PATCH] [73/106] proc: do proper range check on readdir offset Andi Kleen
2011-04-26 21:13 ` [PATCH] [74/106] USB: EHCI: unlink unused QHs when the controller is stopped Andi Kleen
2011-04-26 21:13 ` [PATCH] [75/106] USB: fix formatting of SuperSpeed endpoints in /proc/bus/usb/devices Andi Kleen
2011-04-26 21:13 ` [PATCH] [76/106] USB: xhci - fix unsafe macro definitions Andi Kleen
2011-04-26 21:13 ` [PATCH] [77/106] USB: xhci - fix math in xhci_get_endpoint_interval() Andi Kleen
2011-04-26 21:13 ` [PATCH] [78/106] x86, cpu: Fix regression in AMD errata checking code Andi Kleen
2011-04-26 21:14 ` [PATCH] [79/106] net: ax25: fix information leak to userland harder Andi Kleen
2011-04-26 21:14 ` [PATCH] [80/106] Input: synaptics - fix crash in synaptics_module_init() Andi Kleen
2011-04-26 21:14 ` [PATCH] [81/106] ath9k: fix a chip wakeup related crash in ath9k_start Andi Kleen
2011-04-26 21:14 ` [PATCH] [82/106] ath: add missing regdomain pair 0x5c mapping Andi Kleen
2011-04-26 21:14 ` [PATCH] [83/106] block, blk-sysfs: Fix an err return path in blk_register_queue() Andi Kleen
2011-04-26 21:14 ` [PATCH] [84/106] p54: Initialize extra_len in p54_tx_80211 Andi Kleen
2011-04-26 21:14 ` [PATCH] [85/106] x86, gart: Make sure GART does not map physmem above 1TB Andi Kleen
2011-04-26 21:14 ` [PATCH] [86/106] intel-iommu: Unlink domain from iommu Andi Kleen
2011-04-26 21:14 ` [PATCH] [87/106] intel-iommu: Fix get_domain_for_dev() error path Andi Kleen
2011-04-26 21:14 ` [PATCH] [88/106] drm/radeon/kms: fix bad shift in atom iio table parser Andi Kleen
2011-04-26 21:14 ` [PATCH] [89/106] NFS: nfs_wcc_update_inode() should set nfsi->attr_gencount Andi Kleen
2011-04-26 21:14 ` [PATCH] [90/106] serial/imx: read cts state only after acking cts change irq Andi Kleen
2011-04-26 21:14 ` [PATCH] [91/106] ASoC: Fix output PGA enabling in wm_hubs CODECs Andi Kleen
2011-04-26 21:14 ` [PATCH] [92/106] kconfig: Avoid buffer underrun in choice input Andi Kleen
2011-04-26 21:14 ` [PATCH] [93/106] UBIFS: fix master node recovery Andi Kleen
2011-04-26 21:14 ` [PATCH] [94/106] Remove extra struct page member from the buffer info structure Andi Kleen
2011-04-26 21:14 ` [PATCH] [95/106] dasd: correct device table Andi Kleen
2011-04-26 21:14 ` [PATCH] [96/106] iwlagn: Support new 5000 microcode Andi Kleen
2011-04-27 17:42   ` Tim Gardner
2011-04-27 20:47     ` Valdis.Kletnieks
2011-04-27 22:20       ` Andi Kleen
2011-04-27 22:32         ` wwguy
2011-04-27 22:41           ` Andi Kleen
2011-04-27 22:42             ` wwguy
2011-04-27 22:46               ` Andi Kleen
2011-04-28  2:42                 ` Tim Gardner
2011-04-26 21:14 ` [PATCH] [97/106] uvcvideo: Fix descriptor parsing for video output devices Andi Kleen
2011-04-26 21:14 ` [PATCH] [98/106] Revert "intel_idle: PCI quirk to prevent Lenovo Ideapad s10-3 boot hang" Andi Kleen
2011-04-26 21:14 ` [PATCH] [99/106] ALSA: hda - VIA: Add missing support for VT1718S in A-A path Andi Kleen
2011-04-26 21:14 ` [PATCH] [100/106] ALSA: hda - VIA: Fix stereo mixer recording no sound issue Andi Kleen
2011-04-26 21:14 ` [PATCH] [101/106] From: iwlwifi: fix skb usage after free Andi Kleen
2011-04-26 21:14 ` [PATCH] [102/106] From: intel-iommu: Fix use after release during device attach Andi Kleen
2011-04-26 21:14 ` [PATCH] [103/106] From: USB: Fix unplug of device with active streams Andi Kleen
2011-04-26 21:14 ` [PATCH] [104/106] From: USB: xhci - also free streams when resetting devices Andi Kleen
2011-04-26 21:14 ` [PATCH] [105/106] From: 2.6.35.y: Revert "SH: Add missing consts to sys_execve() declaration" Andi Kleen
2011-04-26 21:14 ` [PATCH] [106/106] Release 2.6.35.13 Andi Kleen
2011-04-27  0:08 ` [stable] [PATCH] [0/106] 2.6.35.13 longterm review Chuck Ebbert
2011-04-27  2:58   ` Andi Kleen
2011-04-27  0:17 ` Tim Bird
2011-04-27  0:21 ` [stable] " Chuck Ebbert
2011-04-27  3:08   ` Andi Kleen

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=20110426211347.3AF473E1886@tassilo.jf.intel.com \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=alexandre.f.demers@gmail.com \
    --cc=gregkh@suse.de \
    --cc=hpa@linux.intel.com \
    --cc=joerg.roedel@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=tim.bird@am.sony.com \
    /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

Powered by JetHome