Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754828AbcCBQ2J (ORCPT ); Wed, 2 Mar 2016 11:28:09 -0500 Received: from mail-bn1on0062.outbound.protection.outlook.com ([157.56.110.62]:37280 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750977AbcCBQ2G (ORCPT ); Wed, 2 Mar 2016 11:28:06 -0500 Authentication-Results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=amd.com; alien8.de; dkim=none (message not signed) header.d=none;alien8.de; dmarc=permerror action=none header.from=amd.com; X-WSS-ID: 0O3F72L-08-WTR-02 X-M-MSG: Subject: Re: [PATCH 2/3] x86/mce/AMD, EDAC: Simplify SMCA decoding To: Borislav Petkov 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> <20160302162138.GL16954@pd.tnic> CC: , , , , , , , , , , , , , , From: Aravind Gopalakrishnan Message-ID: <56D7148D.2080806@amd.com> Date: Wed, 2 Mar 2016 10:27:57 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160302162138.GL16954@pd.tnic> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.180.168.240] X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.222;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(428002)(377454003)(199003)(479174004)(189002)(164054003)(106466001)(77096005)(105586002)(5004730100002)(86362001)(2950100001)(93886004)(50466002)(64126003)(81156010)(59896002)(33656002)(87936001)(23676002)(36756003)(230700001)(54356999)(2906002)(5008740100001)(189998001)(76176999)(50986999)(87266999)(65816999)(92566002)(101416001)(1220700001)(1096002)(4326007)(6116002)(3846002)(110136002)(586003)(83506001)(47776003)(5001960100004)(4001350100001)(80316001)(19580395003)(11100500001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR12MB0709;H:atltwp02.amd.com;FPR:;SPF:None;MLV:sfv;A:1;MX:1;LANG:en; X-MS-Office365-Filtering-Correlation-Id: 3c018aa3-744b-4560-67a8-08d342b79fca X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0709;2:tMJmDTLMWyB8kBU0YfALh6T8GS4Dv6Btz6o5sDC3VjAaqDv6LofmSQTDnBR8SuzPoKtBZwHqrVlGHcTLJze2kBqvnR9r3W/+qC0ktDYGPxNK4rklK7UfMZbm9jOx4a4XtfOJl/9lg58lkSrcY0+MzHWASDmw6M75LuKSCHTjxkQFErkLNPg7qaWFbMjxQjiT;3:Xm1yBMtcA37Ottys2hZ6EokUE1pCeZpKXFlpGVDM6fE0aiJ2Q/rkewqlLCS5NxhKrslggyrTGVU05HxV+g6SzxHpWccG7/ZXoMtKaMF1K34Ccf3lOJ6KEjiJtEjTtYVWgiFiGunGyIcDpJN7yXgsellvF+jVaIYZJ62goPe/ZBnTRBXPzQ/z5Vx6X9OB2DJJ7Dd2tlNxMcHk4UhDFC72jjCvLD488mGRPdl5JGQY7Rw=;25:9LhYo1yQvjx4XuwKkVzUePXKbe4h+ejXLHE2hPCacLXZMQsr4mMG1y8WzEzNjM40Xan5n5x5l6bwUDhUVfi8ILZFnD2xY07a9N6BjTOzQiR5eQyggQWg3r8kf5tBSQZfrmZzGcHkuY24pHJok0TBJlZnujymG43jtF3/3tkzSac7Lgy9yoXf5Y9F65rud++YQGOsnB1IHQXRyRRQj1zl9GiCddNZU4m0wiSTgu2HVFd6TGufMH3DcdzAecC08a74Rb6bhb8bi1tdHebi6+5lS5kp35iBqnYkgGnNqrM5A28FPXNQTg/UhKpXV9230eE9uu1AW//7o0hEqEC1hLzdYA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR12MB0709; X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0709;20:xU7LtxhAAJQ1+/571Q0E/MmDdktGisXNbhYRAtbDRxCa/y6aISm+Ar2sg/PGkfhcA/0KZ75bcPf0jKtg8QxgMMjUHKEfu7Gp7jgtt5dGf/IesGaJMkn8lRPKTJBZcN5YGkYWtsKSrwkDu6AQxkS2r9LwjvVx7OxhibVwvonqsFNf1cSIpsrTWdrqYXqfFgID6DYpCW0TkKNsoOoweYxv1CHr7ctD1aCRPWP8Yn9J5ffT6LUSSiTR9+LCehLoVhBs4oRR6J+fHvIiorp0NKeqAhAys+kKb3owl6ykAXdONTHAtQFCzsiHAt1Vp4B52gLbalEtjDgvsjUv5QfvOAc14ycRFlKlKaRcpOqno34v+9m6yQbU/GyVjdRJq9Wa0HhIrW55pLn5rm/C1J17wGapVlXXR3LFLqn+fykLX98jwwSnghfh32HjvCBavI19Vu8bwEfMddy1f/SdVYWSnXRHu81kI+vIKoKhv6CceN3qc0dnxh4raHHVzph5sNv0wSfH X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(13018025)(13017025)(13015025)(13024025)(13023025)(8121501046)(3002001)(10201501046);SRVR:BY2PR12MB0709;BCL:0;PCL:0;RULEID:;SRVR:BY2PR12MB0709; X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0709;4:Pr7UenW+EmRJIZHcl3U7BKCTVeLLXX4Q2lehguyanisT6ZQ+Z21cRp5hT5ktjDSqZYehf1xRsY8nhvrvd/9SUK6VzR0GIkDPyB/dNZPzIeWysGUwYKVbM0fcKyXowoaw2eRAYNz6VX80bcHlcsunoCr8KcjU8UYjuYwIGMgtca4sCap/9I03+LfFMbakMdvoeumb15RN6Yy0w4Nog6UXUeVsxAw1VGOD+5DHIgj7hCYes2uf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?= =?utf-8?B?Q2t2SE9LVmZsOS96NStQZWFYN1BNOWJOck1JY0xuWlpUSkJGN2dZNy9MMTRR?= =?utf-8?B?aFBVWVIrRzFQeS80ZGdtRHIxQjA3YS9jRE9UMExDaDBmWEJZWi9KbVNnPT0=?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0709;5:TOZJuHUyo80OPiABP/OI5MTOMKlUS9wONAYo7HqerKtSPx553zNEzo3znJrk3EagnSRrj0WJ/z81qDp0PsR8/cBkR/9d+0cPE2nMt/2Xm9Zc6J8bK8lpnZX3u83rXYCj14lc5vfYlj8CA2yV8CxpAw==;24:jLbXLA02TDwahAXk1Q3dOD1a76ZrIW+FotAk4RHgzHWgFAqhxBh3iqi+Fcivn6sbuZjL4oTVvbH0bA5gUiYI1msMx53/snjbrwZ5/eFOCQE=;20:S7YJgkUCVvHlFETGpoNr77X6knNG+3bYxb5Ukyc5uE5kaMMcsyToogfUQkAkyC/CGuz6utJXGWsqrqeYEu5qIeEWC81MYBSRzTU0EgocCztUT51rOh48mzrPvVLU5xMNQ6Qel9YyoEGGsK2VB1+Twbqkg1/u2sVgj4RYEhF8oDkgoEWFoEDnIoaMjR9Msa+aiKxA0Qi8wal39zxzDCWtAhO6g9GeGSRkuHG9scMWNdgH+xR+39pcJgrj6VdLEo+6 SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2016 16:28:00.5568 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.222];Helo=[atltwp02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0709 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1907 Lines: 50 On 3/2/2016 10:21 AM, Borislav Petkov wrote: > 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? Sure. I was going to introduce these strings as part of patch to update sysfs code to understand the new banks anyway. So it's already in the works:) > I really don't want to be assigning strings each time during decoding. Ok, Will update the EDAC to use the existing string array. > 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"... Understood. Will do as you suggest. > Making the unabbreviated lowercase for sysfs usage is fine too, of > course. > > So, have you pushed the set of patches you applied somewhere? (bp.git?) I can work on top of those and it will be easier to rebase on top of tip.git once the patches find their way there.. Thanks, -Aravind.