Received: by 10.192.165.148 with SMTP id m20csp1930511imm; Thu, 26 Apr 2018 04:21:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+aSPhwqUqafFkOyt1mZmnrPjKrRy34AUPKvBycm71DgYCPZs1aadMX6KBY5Jafdk48Ccuv X-Received: by 10.98.92.129 with SMTP id q123mr32056785pfb.252.1524741703785; Thu, 26 Apr 2018 04:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524741703; cv=none; d=google.com; s=arc-20160816; b=EzoXj/LWc5/ayf5onY4lNu8rTqeLDS23D3cU8tT7r14bEN9OxwM5wCn+J4hMrPKOof ScRXB1Zvyjn6vBi0RSJTsBW8nApLHXYk2Fd3S0/YPwKsUgOe6olGspk2b1cC45bEb/95 yNHDLgcJW1u/K/smcUaRsLwunZ90xvtGIXj/EK1T8O+hTjAQaUyumYtCxMhipz5FNxLV /iNkR5eMB4ssqdKzatrTzOIExXQNMu+e3vcv0RBfQY2Gj0p8mnd2H+UJxPW/RudpJ0CV zfydNoiI93yyJHF7wx4pDAG6D7b8ToEWXFduPY0/Cp2M0iISMX5rFOkOziXzoMF88QfH YdYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=YTVlhbFlYL1IimbGEWpACynX7dHal0S+LAX9Et2TIO4=; b=e/7c3Cr0n9pteuWsTRTAFDDYtPq/Rb+mDantCrOXHgnwic6YIqANAWB+FeobETxGW+ jeKER1WR52zJT/jE7XIgXnEaZqcRz3PxBkm6wp0msL0cZkRxFl7dIrK5AsEUW7HIqSf/ BwlKhDlv7v+AZkavd0OWdT5jvwrHwr2yo+kDHYzKysPL2hJiAjRG7kldPZrx5kx+n2W4 qaZaaAkZrgAM7tt5foQVa1FK4CnwMG0JLMTYn8JCYvJ54Resbb/M9BNXIqnc6FuS2Om5 ntHd5ZqRpBGNXLh6tUOSsZOVnJVAzHFwATG9ZnCsejYnTKMfCmZIIN8VRHr7b+SznlI2 UeWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11si11571299pgn.530.2018.04.26.04.21.29; Thu, 26 Apr 2018 04:21:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755635AbeDZLUX (ORCPT + 99 others); Thu, 26 Apr 2018 07:20:23 -0400 Received: from mail.skyhub.de ([5.9.137.197]:43860 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754743AbeDZLUV (ORCPT ); Thu, 26 Apr 2018 07:20:21 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id vTCK2MfF_IyU; Thu, 26 Apr 2018 13:20:03 +0200 (CEST) Received: from pd.tnic (p200300EC2BC8F90010D6750E125BA95E.dip0.t-ipconnect.de [IPv6:2003:ec:2bc8:f900:10d6:750e:125b:a95e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 6F78E1EC020C; Thu, 26 Apr 2018 13:20:00 +0200 (CEST) Date: Thu, 26 Apr 2018 13:19:46 +0200 From: Borislav Petkov To: Alexandru Gagniuc Cc: linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , Tony Luck , Mauro Carvalho Chehab , Robert Moore , Erik Schmauss , Tyler Baicar , Will Deacon , James Morse , Shiju Jose , "Jonathan (Zhixiong) Zhang" , Dongjiu Geng , linux-kernel@vger.kernel.org, devel@acpica.org Subject: Re: [RFC PATCH v3 2/3] acpi: apei: Do not panic() on PCIe errors reported through GHES Message-ID: <20180426111946.GA15009@pd.tnic> References: <20180416215903.7318-1-mr.nuke.me@gmail.com> <20180425203957.18224-1-mr.nuke.me@gmail.com> <20180425203957.18224-3-mr.nuke.me@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180425203957.18224-3-mr.nuke.me@gmail.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 25, 2018 at 03:39:50PM -0500, Alexandru Gagniuc wrote: > @@ -932,7 +971,7 @@ static void __process_error(struct ghes *ghes) > static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) > { > struct ghes *ghes; > - int sev, ret = NMI_DONE; > + int sev, asev, ret = NMI_DONE; > > if (!atomic_add_unless(&ghes_in_nmi, 1, 1)) > return ret; > @@ -945,8 +984,9 @@ static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) > ret = NMI_HANDLED; > } > > + asev = ghes_actual_severity(ghes); > sev = ghes_severity(ghes->estatus->error_severity); So renaming ghes_deferrable_severity() to ghes_actual_severity() is not a big change. And that's not what I meant. I'd like to see here: sev = ghes_severity(ghes); and inside you do all the required mapping/severity processing/etc. And you can rename the current ghes_severity() to ghes_map_cper_severity() or whatever... > - if (sev >= GHES_SEV_PANIC) { > + if ((sev >= GHES_SEV_PANIC) && (asev >= GHES_SEV_PANIC)) { ... so that this change doesn't happen and there are not two severities queried but a single one. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.