From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752527AbbCXPC4 (ORCPT ); Tue, 24 Mar 2015 11:02:56 -0400 Received: from mail-bn1bon0113.outbound.protection.outlook.com ([157.56.111.113]:12704 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752179AbbCXPCy convert rfc822-to-8bit (ORCPT ); Tue, 24 Mar 2015 11:02:54 -0400 X-WSS-ID: 0NLQ1S9-07-7KX-02 X-M-MSG: Message-ID: <55117C89.6080609@amd.com> Date: Tue, 24 Mar 2015 10:02:33 -0500 From: Aravind Gopalakrishnan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Borislav Petkov CC: , , , , , , , , Subject: Re: [PATCH V3 1/2] x86, mce, severities: Add AMD severities function References: <1427125373-2918-1-git-send-email-Aravind.Gopalakrishnan@amd.com> <1427125373-2918-2-git-send-email-Aravind.Gopalakrishnan@amd.com> <20150324083039.GA11525@pd.tnic> In-Reply-To: <20150324083039.GA11525@pd.tnic> Content-Type: text/plain; charset="utf-8"; format=flowed X-Originating-IP: [10.180.168.240] Content-Transfer-Encoding: 8BIT X-EOPAttributedMessage: 0 Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=Aravind.Gopalakrishnan@amd.com; alien8.de; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:165.204.84.221;CTRY:US;IPV:NLI;EFV:NLI;BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(428002)(479174004)(377454003)(51704005)(199003)(164054003)(189002)(65806001)(59896002)(87936001)(54356999)(87266999)(50466002)(33656002)(36756003)(86362001)(76176999)(83506001)(101416001)(19580395003)(120886001)(2950100001)(77096005)(64126003)(106466001)(99136001)(92566002)(62966003)(23676002)(65956001)(105586002)(47776003)(80316001)(110136001)(46102003)(77156002)(50986999);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0201MB0894;H:atltwp01.amd.com;FPR:;SPF:None;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0201MB0894; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002010);SRVR:DM2PR0201MB0894;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0201MB0894; X-Forefront-PRVS: 0525BB0ADF X-OriginatorOrg: amd4.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2015 15:02:35.2741 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96;Ip=[165.204.84.221];Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0201MB0894 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/24/2015 3:30 AM, Borislav Petkov wrote: > On Mon, Mar 23, 2015 at 10:42:52AM -0500, Aravind Gopalakrishnan wrote: >> >> +/* keeping mce_severity_amd in sync with AMD error scope heirarchy table */ > Which table do you mean? > > I changed it to: > > /* > * See AMD Error Scope Hierarchy table in a newer BKDG. For example > * 49125_15h_Models_30h-3Fh_BKDG.pdf, section "RAS Features" > */ Yes, this is the one I meant. Thanks. > to explicitly name it. > >> +static int mce_severity_amd(struct mce *m, enum context ctx) >> +{ >> + enum context ctx = error_context(m); > arch/x86/kernel/cpu/mcheck/mce-severity.c: In function ‘mce_severity_amd’: > arch/x86/kernel/cpu/mcheck/mce-severity.c:192:15: error: ‘ctx’ redeclared as different kind of symbol > enum context ctx = error_context(m); > ^ > arch/x86/kernel/cpu/mcheck/mce-severity.c:190:57: note: previous definition of ‘ctx’ was here > static int mce_severity_amd(struct mce *m, enum context ctx) > ^ > make[4]: *** [arch/x86/kernel/cpu/mcheck/mce-severity.o] Error 1 > make[3]: *** [arch/x86/kernel/cpu/mcheck] Error 2 > make[2]: *** [arch/x86/kernel/cpu] Error 2 > make[1]: *** [arch/x86/kernel] Error 2 > make: *** [arch/x86] Error 2 > make: *** Waiting for unfinished jobs.... > > I fixed it up. Sorry about that. That line should be in [patch 2/2] and I mistakenly committed it as part of this patch. It didn't show up on my builds as I had build tested after applying both patches. But there is a different problem now. The second patch won't apply cleanly on top of your fix- error: while searching for: } /* keeping mce_severity_amd in sync with AMD error scope heirarchy table */ static int mce_severity_amd(struct mce *m, enum context ctx) { enum context ctx = error_context(m); /* Processor Context Corrupt, no need to fumble too much, die! */ error: patch failed: arch/x86/kernel/cpu/mcheck/mce-severity.c:187 I think the clean way to fix this would be to move the line to [patch 2/2]. Besides, we would need a new patch 2 anyway as the patch application would fail due to changes to the comment line. Shall I do that and resend? Thanks, -Aravind.