Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1658129

Re: [PATCH] x86/mce: Don't disable MCA banks when offlining a CPU on AMD systems

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/mce: Don't disable MCA banks when offlining a CPU on AMD systems
Date Mon, 05 Jun 2017 22:20:02 +0200
Message-ID <tP6DM-7wQ-7@gated-at.bofh.it> (permalink)
References <tP6DM-7wQ-9@gated-at.bofh.it>
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Disposition inline
User-Agent NeoMutt/20170113 (1.7.2)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 41
Organization linux.* mail to news gateway
X-Original-Cc linux-edac@vger.kernel.org, Tony Luck <tony.luck@intel.com>, x86@kernel.org, linux-kernel@vger.kernel.org
X-Original-Date Mon, 5 Jun 2017 22:10:22 +0200
X-Original-Message-ID <20170605201022.jgdv7q4ve5lodyxv@pd.tnic>
X-Original-References <1496692427-7991-1-git-send-email-Yazen.Ghannam@amd.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1658129

Show key headers only | View raw


On Mon, Jun 05, 2017 at 02:53:47PM -0500, Yazen Ghannam wrote:
> From: Yazen Ghannam <yazen.ghannam@amd.com>
> 
> 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.
> 
> Do a vendor check for AMD and return early when offling a CPU.
> 
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
>  arch/x86/kernel/cpu/mcheck/mce.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> index 5cfbaeb..e317a95 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -1917,7 +1917,8 @@ static void vendor_disable_error_reporting(void)
>  	 * 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();
> -- 

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] x86/mce: Don't disable MCA banks when offlining a CPU on  AMD systems Borislav Petkov <bp@alien8.de> - 2017-06-05 22:20 +0200

csiph-web