From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933122AbdCaKMI (ORCPT ); Fri, 31 Mar 2017 06:12:08 -0400 Received: from terminus.zytor.com ([65.50.211.136]:41897 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932764AbdCaKMF (ORCPT ); Fri, 31 Mar 2017 06:12:05 -0400 Date: Fri, 31 Mar 2017 03:08:19 -0700 From: tip-bot for Yazen Ghannam Message-ID: Cc: yazen.ghannam@amd.com, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, bp@suse.de, torvalds@linux-foundation.org, linux-edac@vger.kernel.org, hpa@zytor.com Reply-To: mingo@kernel.org, yazen.ghannam@amd.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, peterz@infradead.org, torvalds@linux-foundation.org, linux-edac@vger.kernel.org, bp@suse.de, hpa@zytor.com In-Reply-To: <20170330111713.cnkbloffyouxg52e@pd.tnic> References: <20170330111713.cnkbloffyouxg52e@pd.tnic> To: linux-tip-commits@vger.kernel.org Subject: [tip:ras/urgent] x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs Git-Commit-ID: 7cc5ad0d4aec505bee7f49696867668aa3889195 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 7cc5ad0d4aec505bee7f49696867668aa3889195 Gitweb: http://git.kernel.org/tip/7cc5ad0d4aec505bee7f49696867668aa3889195 Author: Yazen Ghannam AuthorDate: Thu, 30 Mar 2017 13:17:14 +0200 Committer: Ingo Molnar CommitDate: Fri, 31 Mar 2017 08:10:09 +0200 x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs MCA bank 3 is reserved on systems pre-Fam17h, so it didn't have a name. However, MCA bank 3 is defined on Fam17h systems and can be accessed using legacy MSRs. Without a name we get a stack trace on Fam17h systems when trying to register sysfs files for bank 3 on kernels that don't recognize Scalable MCA: WARNING: CPU: 26 PID: 1 at lib/kobject.c:210 kobject_add_internal kobject: (ffff88085bb256c0): attempted to be registered with empty name! ... Call Trace: dump_stack() warn_slowpath_common() warn_slowpath_fmt() kobject_add_internal() kobject_add() kobject_create_and_add() threshold_create_device() threshold_init_device() do_one_initcall() kernel_init_freeable() kernel_init() ret_from_fork() Call MCA bank 3 "decode_unit" since this is what it represents on Fam17h. This will allow kernels without SMCA support to see this bank on Fam17h+ and prevent the stack trace. This will not affect older systems since this bank is reserved on them, i.e. it'll be ignored. Tested on AMD Fam15h and Fam17h systems. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: # 3.10.. Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-edac Link: http://lkml.kernel.org/r/20170330111713.cnkbloffyouxg52e@pd.tnic Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 524cc57..6e4a047 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c @@ -60,7 +60,7 @@ static const char * const th_names[] = { "load_store", "insn_fetch", "combined_unit", - "", + "decode_unit", "northbridge", "execution_unit", };