mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Yazen Ghannam <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tony.luck@intel.com, linux-kernel@vger.kernel.org, hpa@zytor.com,
	bp@suse.de, torvalds@linux-foundation.org,
	linux-edac@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de,
	bp@alien8.de, peterz@infradead.org, yazen.ghannam@amd.com
Subject: [tip:ras/core] x86/mce: Don't disable MCA banks when offlining a CPU on AMD
Date: Wed, 14 Jun 2017 02:19:41 -0700	[thread overview]
Message-ID: <tip-ec33838244c8535b23b8d24b167996fd1318bb68@git.kernel.org> (raw)
In-Reply-To: <20170613162835.30750-8-bp@alien8.de>

Commit-ID:  ec33838244c8535b23b8d24b167996fd1318bb68
Gitweb:     http://git.kernel.org/tip/ec33838244c8535b23b8d24b167996fd1318bb68
Author:     Yazen Ghannam <yazen.ghannam@amd.com>
AuthorDate: Tue, 13 Jun 2017 18:28:34 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 14 Jun 2017 07:32:09 +0200

x86/mce: Don't disable MCA banks when offlining a CPU on AMD

AMD systems have non-core, shared MCA banks within a die. These banks
are controlled by a master CPU per die. If this CPU is offlined then all
the shared banks are disabled in addition to the CPU's core banks.

Also, Fam17h systems may have SMT enabled. The MCA_CTL register is shared
between SMT thread siblings. If a CPU is offlined then all its sibling's
MCA banks are also disabled.

Extend the existing vendor check to AMD too.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
[ Fix up comment. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20170613162835.30750-8-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/mcheck/mce.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 5cfbaeb..3c54c2b 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1912,12 +1912,13 @@ static void mce_disable_error_reporting(void)
 static void vendor_disable_error_reporting(void)
 {
 	/*
-	 * Don't clear on Intel CPUs. Some of these MSRs are socket-wide.
+	 * Don't clear on Intel or AMD CPUs. Some of these MSRs are socket-wide.
 	 * Disabling them for just a single offlined CPU is bad, since it will
 	 * inhibit reporting for all shared resources on the socket like the
 	 * last level cache (LLC), the integrated memory controller (iMC), etc.
 	 */
-	if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
+	if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL ||
+	    boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
 		return;
 
 	mce_disable_error_reporting();

  reply	other threads:[~2017-06-14  9:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 16:28 [PATCH 0/8] RAS: 4.13 pile, part 2 Borislav Petkov
2017-06-13 16:28 ` [PATCH 1/8] x86/mce/AMD: Use msr_stat when clearing MCA_STATUS Borislav Petkov
2017-06-14  9:16   ` [tip:ras/core] " tip-bot for Yazen Ghannam
2017-06-13 16:28 ` [PATCH 2/8] x86/mce/AMD: Use saved threshold block info in interrupt handler Borislav Petkov
2017-06-14  9:16   ` [tip:ras/core] " tip-bot for Yazen Ghannam
2017-06-13 16:28 ` [PATCH 3/8] x86/mce: Merge mce_amd_inj into mce-inject Borislav Petkov
2017-06-14  9:17   ` [tip:ras/core] " tip-bot for Borislav Petkov
2017-06-13 16:28 ` [PATCH 4/8] x86/mce: Get rid of register_mce_write_callback() Borislav Petkov
2017-06-14  9:18   ` [tip:ras/core] " tip-bot for Borislav Petkov
2017-06-13 16:28 ` [PATCH 5/8] x86/mce: Cleanup include files Borislav Petkov
2017-06-14  9:18   ` [tip:ras/core] x86/mce: Clean up " tip-bot for Borislav Petkov
2017-06-13 16:28 ` [PATCH 6/8] x86/mce/mce-inject: Preset the MCE injection struct Borislav Petkov
2017-06-14  9:19   ` [tip:ras/core] " tip-bot for Borislav Petkov
2017-06-13 16:28 ` [PATCH 7/8] x86/mce: Don't disable MCA banks when offlining a CPU on AMD Borislav Petkov
2017-06-14  9:19   ` tip-bot for Yazen Ghannam [this message]
2017-06-13 16:28 ` [PATCH 8/8] x86/mce: Update bootlog description to reflect behavior " Borislav Petkov
2017-06-14  9:20   ` [tip:ras/core] " tip-bot for Yazen Ghannam

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-ec33838244c8535b23b8d24b167996fd1318bb68@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=yazen.ghannam@amd.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