From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753913AbdC2TGP (ORCPT ); Wed, 29 Mar 2017 15:06:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:38140 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752963AbdC2TGO (ORCPT ); Wed, 29 Mar 2017 15:06:14 -0400 Date: Wed, 29 Mar 2017 21:06:08 +0200 From: Borislav Petkov To: Yazen Ghannam Cc: linux-edac@vger.kernel.org, Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/mce/AMD: Give a name to MCA bank 3 to use with legacy MSRs Message-ID: <20170329190608.n3tt252mwlfrl54s@pd.tnic> References: <1490102285-3659-1-git-send-email-Yazen.Ghannam@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1490102285-3659-1-git-send-email-Yazen.Ghannam@amd.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 21, 2017 at 08:18:05AM -0500, Yazen Ghannam wrote: > From: Yazen Ghannam > > 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. > > 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. > > WARNING: CPU: 26 PID: 1 at lib/kobject.c:210 kobject_add_internal+0x23e/0x340() > kobject: (ffff88085bb256c0): attempted to be registered with empty name! > ... > Call Trace: > [] dump_stack+0x63/0x90 > [] warn_slowpath_common+0x86/0xc0 > [] warn_slowpath_fmt+0x4c/0x50 > [] ? kobject_add_internal+0x18e/0x340 > [] ? kfree_const+0x22/0x30 > [] kobject_add_internal+0x23e/0x340 > [] ? kfree_const+0x22/0x30 > [] kobject_add+0x68/0xb0 > [] kobject_create_and_add+0x33/0x70 > [] threshold_create_device+0x107/0x350 > [] ? mcheck_vendor_init_severity+0x1a/0x1a > [] threshold_init_device+0x35/0x4d > [] do_one_initcall+0xb3/0x1d0 > [] kernel_init_freeable+0x163/0x1f0 > [] ? rest_init+0x80/0x80 > [] kernel_init+0xe/0xe0 > [] ret_from_fork+0x3f/0x70 > [] ? rest_init+0x80/0x80 > > Signed-off-by: Yazen Ghannam > Cc: # 3.10.. > --- > 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 d3e5be8..c82befc 100644 > --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c > +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c > @@ -62,7 +62,7 @@ static const char * const th_names[] = { > "load_store", > "insn_fetch", > "combined_unit", > - "", > + "decode_unit", > "northbridge", > "execution_unit", > }; > -- Applied, thanks. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --