Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758150AbcCCPzp (ORCPT ); Thu, 3 Mar 2016 10:55:45 -0500 Received: from mail-bn1bon0062.outbound.protection.outlook.com ([157.56.111.62]:60128 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758067AbcCCPzU (ORCPT ); Thu, 3 Mar 2016 10:55:20 -0500 Authentication-Results: alien8.de; dkim=none (message not signed) header.d=none;alien8.de; dmarc=none action=none header.from=amd.com; From: Aravind Gopalakrishnan To: , , , , , , CC: , , , , , , , , , Subject: [PATCH V3 5/5] x86/mce/AMD: Add comments for easier understanding Date: Thu, 3 Mar 2016 10:10:58 -0600 Message-ID: <1457021458-2522-6-git-send-email-Aravind.Gopalakrishnan@amd.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1457021458-2522-1-git-send-email-Aravind.Gopalakrishnan@amd.com> References: <1457021458-2522-1-git-send-email-Aravind.Gopalakrishnan@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN1PR0701CA0022.namprd07.prod.outlook.com (25.162.96.32) To BY1PR12MB0421.namprd12.prod.outlook.com (25.162.146.30) X-MS-Office365-Filtering-Correlation-Id: ea695afd-0e74-4bdc-6781-08d3437c3045 X-Microsoft-Exchange-Diagnostics: 1;BY1PR12MB0421;2:L+MLskagJdVfGF+Qgs8gAB5LG9p3p3EcnO6+EKKc/YeKaqeKkMe0sPYRfCR28f3F877aNBXi8OXBwgTbAKlMmP/nRFuhFap76SyXaDghQ3rMR41mIwowYOu0qoZWLnCKKsFHh7Y+jSH05sPyJnPhJn5phzTtgaLSttsfOp32DMraKYVnC6PYx8SWXkj5O3+y;3:qQqPNe5IAlQmkdRJMggW7XkgmbERVLF3Lf95CHB8UZAUbLbIiNsB3sDBcDfAuOEGO0BaHE9zMqR3VISVvSrHdBEMNGnVwO7RUjZlTDoCz8Nh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jMVeC9meHQgqU6fhvwjc95zXvMr59+5CrwxajcQ/4aDMXFe67864PiHV2IUrp2xi7kja2zdH9GQ+VppcOzYWll1W+ueiw/jI2TstlHHqhKQa3zMZwS9mcTgeXOlLak6StW4pec5aUREx+r0uL1VGdbtlbu6zw3Gc7jX1XAtpO7iauS+B7TX2ljD3qjj8R9njEZmUETEQxIAlhPsqsU+g52Ouv1Y8q9Y3ceZcoGn/h0OJ0WY5fM/ufY7AgxAweFvrS2tcFXY3KW6oumtQ3A9a4w2qRCXEG/CQ71Zq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:BY1PR12MB0421;BCL:0;PCL:0;RULEID:;SRVR:BY1PR12MB0421; X-Forefront-PRVS: 0870212862 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(229853001)(2906002)(48376002)(2950100001)(40100003)(50986999)(92566002)(122386002)(4326007)(76176999)(50226001)(189998001)(5001770100001)(42186005)(15975445007)(6116002)(50466002)(586003)(36756003)(1096002)(5008740100001)(81166005)(575784001)(2201001)(86362001)(87976001)(53416004)(5004730100002)(66066001)(19580405001)(47776003)(19580395003)(77096005)(5003940100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR12MB0421;H:arav-dinar.amd.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR12MB0421;23:JjgpIk+U7nhP/3ZsKe26yIdMYyzMX5nxIrg4FW8i9?= =?us-ascii?Q?fw5cUak0JckaiTWVDR8TWQmZjN1R9ApZWDuV5gnzZn9jiD4S+jr46ZhmH+76?= =?us-ascii?Q?Vf3RJjTqMCf7Tp5OCuh84sBQlBd5CD7RLb9PdSAQUwji2KD+BiMt67X0Uneu?= =?us-ascii?Q?hdxGD8fXIuR6zus+Q/f3g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d7NhlWpsDo2Al+8f+VZtEqfiOiewbF2pENND5Nz7A/GDz/W64KqS+HiU9/hBfz37ucWjjNCQjLGVYVGXUeu0CZQw5eXxZq32O/uRNys16Hr/NTkXXeBq7Uk/dSoaRww==;24:opgbTXrHxN2i0S+dCwNE/VHWX7SbogJTZ6RAIH8apDgCIEuTsrhZYen1CTipJ2MTGBMhtyk2vD7JV6m19tlhuZ0NY21Iwiv4Co8guhtlK0M=;20:dH1PlDQCkHapcRwEV1C7rujQF0e+18j3fc9A/XadffsuD6g9FJEXeAZ+S3iqheYTPWoEOE0wVUZ33/xw2oRZedamXNBXuSCNq0TP3V8J966mpDZ7lbU4/pf+4C8KKNMS7QVwyGyh5enk67utc7hIw7Ap47ILtMA/Z5fJyHP3s3zQqOccXhLhZimFkWsq3CMZNYOoim3Pnv8segZbLACVwzawxGuf8Lj5F//SXvQXYGLMB7UgX3gE6cufRFQ584Yg X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2016 15:55:04.1888 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR12MB0421 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2466 Lines: 67 In an attempt to aid in understanding of what the threshold_block structure holds, provide comments to describe the members here. Also, trim comments around threshold_restart_bank() and update copyright info. No functional change is introduced. Signed-off-by: Aravind Gopalakrishnan --- arch/x86/include/asm/amd_nb.h | 18 +++++++++--------- arch/x86/kernel/cpu/mcheck/mce_amd.c | 7 ++----- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h index 3c56ef1..bc01c0a 100644 --- a/arch/x86/include/asm/amd_nb.h +++ b/arch/x86/include/asm/amd_nb.h @@ -27,15 +27,15 @@ struct amd_l3_cache { }; struct threshold_block { - unsigned int block; - unsigned int bank; - unsigned int cpu; - u32 address; - u16 interrupt_enable; - bool interrupt_capable; - u16 threshold_limit; - struct kobject kobj; - struct list_head miscj; + unsigned int block; /* Threshold block number within bank */ + unsigned int bank; /* MCA bank the block belongs to */ + unsigned int cpu; /* CPU which controls the MCA bank */ + u32 address; /* MSR address for the block */ + u16 interrupt_enable; /* Enable/ Disable APIC interrupt upon threshold error */ + bool interrupt_capable; /* Specifies if interrupt is possible from the block */ + u16 threshold_limit; /* Value upon which threshold interrupt is generated */ + struct kobject kobj; /* sysfs object */ + struct list_head miscj; /* Add multiple threshold blocks within a bank to the list */ }; struct threshold_bank { diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 879c20f..f5b4b80 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c @@ -1,5 +1,5 @@ /* - * (c) 2005-2015 Advanced Micro Devices, Inc. + * (c) 2005-2016 Advanced Micro Devices, Inc. * Your use of this code is subject to the terms and conditions of the * GNU general public license version 2. See "COPYING" or * http://www.gnu.org/licenses/gpl.html @@ -202,10 +202,7 @@ static int lvt_off_valid(struct threshold_block *b, int apic, u32 lo, u32 hi) return 1; }; -/* - * Called via smp_call_function_single(), must be called with correct - * cpu affinity. - */ +/* Reprogram MCx_MISC MSR behind this threshold bank */ static void threshold_restart_bank(void *_tr) { struct thresh_restart *tr = _tr; -- 2.7.0