From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753271AbdIDHUi (ORCPT ); Mon, 4 Sep 2017 03:20:38 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36393 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751949AbdIDHUh (ORCPT ); Mon, 4 Sep 2017 03:20:37 -0400 X-Google-Smtp-Source: ADKCNb7tRf9I6JCbcN3Eo529T44bhCAEPyTneSmcznsN+hN4aoAwCDKgSX6SkjApFY7a6bQErBbA1g== Date: Mon, 4 Sep 2017 09:20:33 +0200 From: Ingo Molnar To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , "H. Peter Anvin" , Borislav Petkov , Peter Zijlstra , Andrew Morton Subject: [GIT PULL] RAS update for v4.14 Message-ID: <20170904072033.rvifhj5eepz3yj4q@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus, Please pull the latest ras-core-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git ras-core-for-linus # HEAD: 9662d43f523dfc0dc242ec29c2921c43898d6ae5 x86/mce/AMD: Allow any CPU to initialize the smca_banks array A single change fixing SMCA bank initialization on systems that don't have CPU0 enabled. Thanks, Ingo ------------------> Yazen Ghannam (1): x86/mce/AMD: Allow any CPU to initialize the smca_banks array arch/x86/kernel/cpu/mcheck/mce_amd.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 9e314bcf67cc..5ce1a5689162 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c @@ -201,8 +201,8 @@ static void smca_configure(unsigned int bank, unsigned int cpu) wrmsr(smca_config, low, high); } - /* Collect bank_info using CPU 0 for now. */ - if (cpu) + /* Return early if this bank was already initialized. */ + if (smca_banks[bank].hwid) return; if (rdmsr_safe_on_cpu(cpu, MSR_AMD64_SMCA_MCx_IPID(bank), &low, &high)) { @@ -216,11 +216,6 @@ static void smca_configure(unsigned int bank, unsigned int cpu) for (i = 0; i < ARRAY_SIZE(smca_hwid_mcatypes); i++) { s_hwid = &smca_hwid_mcatypes[i]; if (hwid_mcatype == s_hwid->hwid_mcatype) { - - WARN(smca_banks[bank].hwid, - "Bank %s already initialized!\n", - smca_get_name(s_hwid->bank_type)); - smca_banks[bank].hwid = s_hwid; smca_banks[bank].id = low; smca_banks[bank].sysfs_id = s_hwid->count++;