Received: by 10.192.165.148 with SMTP id m20csp2426931imm; Thu, 26 Apr 2018 10:46:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/OyvADVERJDxglbB0mQchTDxXn5cFCL/oVf9sMoSQ5Y2Z2M8VgeTwlD+aeRtiVY41kWwn1 X-Received: by 10.98.157.137 with SMTP id a9mr27110352pfk.206.1524764802403; Thu, 26 Apr 2018 10:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524764802; cv=none; d=google.com; s=arc-20160816; b=oeSsKRFPB+atX/k/iRnZNArvz9tE9A3Bx06t7fZx4JCeSp1FJ+CnGzbbmS86HAj+hu wSQeMeT6d/Rw57xBu43TT17Hlk7CdNDBABvtFly25rUGKLSbUa6pH4S2kdEE83+JgBwm KgL0di8raiGgRJqcB74Z/CyvwVDrcmjExENQTOMxxkr21zxF/PKP34O+jbk0oJh3Cn/q xwe+lN7tjkdS04gcviYfZ/yi0FOdcgG1x7WJx6pgOxMBYkg3G9mnxQEc39cKFfTu5rtB 2jxnwOEsinJHgzSsyreBUgxq1V1sBvAOxjpUj4DeuCihgfxf/T8xR7CVwvDXRAffyW8f GjOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=pAviCLpO4BW/+3nnQy52FuZPeNXoe3HrFJ8XXLJy4L4=; b=dwRIqAO3DjU49sgeCUIOwtsgnrGC1V19UD1c6mfbAd7PwKm+4sr/Ua6EbdhmSc37CJ XPl4hstv3vJgq+LykYVSuf6m/rCyo9afSUsbnXTg4VvEYwVnZLh4DgBon7dvK/+Y8ftz qUdAgttceGJFNMdvbnW5SNeGKtY14IIE28XTzfFnJju0w+ZURY55fBkH9YwfdugiuUFx SJpueMl0mmhsbO0+1Q1AznO9U54m5jeIvZu4fYDgllOdA3DW7Sg6GJXrPXU+XS7KU4ry zbI420pdNjQpV6iQHjwX8ZTPfTV4xMtKrk5WEYrZYBUJpFIJhDXfFhXSdiwpwZQ/YwOr 5hzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X3BlKYDg; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8si13395798pfl.344.2018.04.26.10.46.25; Thu, 26 Apr 2018 10:46:42 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X3BlKYDg; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932228AbeDZRpJ (ORCPT + 99 others); Thu, 26 Apr 2018 13:45:09 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:37767 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754014AbeDZRpF (ORCPT ); Thu, 26 Apr 2018 13:45:05 -0400 Received: by mail-oi0-f65.google.com with SMTP id f63-v6so24923261oic.4; Thu, 26 Apr 2018 10:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=pAviCLpO4BW/+3nnQy52FuZPeNXoe3HrFJ8XXLJy4L4=; b=X3BlKYDgBSaDfFC5x9s0SBkrSztkTeQDFAbOBzZD4+AXPo+z3AldF2NW9DneddE/Rz AZVMVu2cX11xOfbeQ+Gc5WuQKdyOpZczfS3AhAOaKHvN/gFRsqS0QmDoK58DomOn8jz6 RLSlSjDeeD2bghl713ILqIfZ4GVOQAHLn4jPrOHf49ci52TEbHg8+dGNoOO6Vi+djD4M YOcUF8r2fhSAxyYeJ7OlhTWrPkDAyxymkESFtfLcQCnde/U5COct7t4rjdQHPFyPba3v HPP/TKgg1nS+dEp0Ko1gaMcI9sZbvxWG4wToCCnKIu4D7sOBQ9vG5P8KEPcuVIsRyoHB 6nGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=pAviCLpO4BW/+3nnQy52FuZPeNXoe3HrFJ8XXLJy4L4=; b=qRpXcIyp99WkUr6d1vaCa6OG7OeI6zXIimE/4duasDLLPTuMBpBU/4zkmcSchs0CLV 8eMMl0t6VGRE4DFWnVn/BUVoZ47cGW7X9FdZt6pSkFyfJwAT9bYUTNWvhTofZz4Zvxw0 cyIvgwdgNBU3ECIpQLjjzqVPyjiiyfZK3gHtQqiKHPqhqgd5oi5TJQpzUG4JB2EJNEod d1qdGatX7rkFgz6jAu/v/EhFyqH3Q+jY0JUh6LMJ+j6TC6RJ3w8Lp0lML/Q4pd/4XKS8 5Bj60YF6BqBRW8aDs8u/SXOQh1lGa8ZbnntR5t5f06K2wftqhI45cMxZW6Q0znxYet8u KIjw== X-Gm-Message-State: ALQs6tCfNFkP0cLch9mtRhQtdGdigbL/oRbYuT/+VpBkgjpjtTj9z9cu DshNOKbVEeqqbGg5VXbWC9Q= X-Received: by 2002:aca:59c1:: with SMTP id n184-v6mr21874931oib.158.1524764699423; Thu, 26 Apr 2018 10:44:59 -0700 (PDT) Received: from nukespec.gtech ([2601:2c1:8500:500b::e4e]) by smtp.gmail.com with ESMTPSA id r200-v6sm8909855oie.4.2018.04.26.10.44.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Apr 2018 10:44:58 -0700 (PDT) Subject: Re: [RFC PATCH v3 2/3] acpi: apei: Do not panic() on PCIe errors reported through GHES To: Borislav Petkov 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, austin_bolen@dell.com, alex_gagniuc@dellteam.com, shyam_iyer@dell.com 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> <20180426111946.GA15009@pd.tnic> From: "Alex G." Message-ID: Date: Thu, 26 Apr 2018 12:44:57 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180426111946.GA15009@pd.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Borislav, On 04/26/2018 06:19 AM, Borislav Petkov wrote: > 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'm sorry I misunderstood you. > I'd like to see here: > > sev = ghes_severity(ghes); 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... I agree that the current ghes_severity() name is vague. I'll get it done properly in v4 (next week). >> - 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. Two severities is a result of the wanky GHES data structure. Nothing says we have to use the severity field in the header... if you're okay with just ignoring it. Alex