Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755461AbcCBQVs (ORCPT ); Wed, 2 Mar 2016 11:21:48 -0500 Received: from mail.skyhub.de ([78.46.96.112]:57048 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753002AbcCBQVq (ORCPT ); Wed, 2 Mar 2016 11:21:46 -0500 Date: Wed, 2 Mar 2016 17:21:39 +0100 From: Borislav Petkov To: Aravind Gopalakrishnan Cc: tony.luck@intel.com, hpa@zytor.com, mingo@redhat.com, tglx@linutronix.de, dougthompson@xmission.com, mchehab@osg.samsung.com, x86@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, ashok.raj@intel.com, gong.chen@linux.intel.com, len.brown@intel.com, peterz@infradead.org, ak@linux.intel.com, alexander.shishkin@linux.intel.com Subject: Re: [PATCH 2/3] x86/mce/AMD, EDAC: Simplify SMCA decoding Message-ID: <20160302162138.GL16954@pd.tnic> References: <1456785179-14378-1-git-send-email-Aravind.Gopalakrishnan@amd.com> <1456785179-14378-3-git-send-email-Aravind.Gopalakrishnan@amd.com> <20160302105032.GC16954@pd.tnic> <20160302105353.GE16954@pd.tnic> <56D70C37.1090902@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56D70C37.1090902@amd.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1441 Lines: 41 On Wed, Mar 02, 2016 at 09:52:23AM -0600, Aravind Gopalakrishnan wrote: > So, I think we should continue this approach and have something like this- > static const char * const amd_core_mcablock_names[] = { > [SMCA_LS] = "load_store", > [SMCA_IF] = "insn_fetch", > [SMCA_L2_CACHE] = "l2_cache", > [SMCA_DE] = "decode_unit", > [RES] = "", > [SMCA_EX] = "execution_unit", > [SMCA_FP] = "floating_point", > [SMCA_L3_CACHE] = "l3_cache", > }; > > static const char * const amd_df_mcablock_names[] = { > [SMCA_CS] = "coherent_slave", > [SMCA_PIE] = "pie", > }; > > (Split arrays again because I feel it'd be better to have arrays ordered > according to mca_type values) Ok, care to take the patch and redo it as you suggest? I really don't want to be assigning strings each time during decoding. Also, make sure the strings are as human readable as possible and so that users can at least have an idea what we're saying. "load_store" is better than "LS", "insn_fetch" is better than "IF", etc. Some abbreviations should remain, though. "platform_security_processor" is yucky and I guess there we can stick to "PSP". Ditto for "SMU"... Making the unabbreviated lowercase for sysfs usage is fine too, of course. Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.