From patchwork Fri May 25 15:53:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Alex G." X-Patchwork-Id: 10427873 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3D90C601D5 for ; Fri, 25 May 2018 15:55:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B538287F2 for ; Fri, 25 May 2018 15:55:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F26D288E0; Fri, 25 May 2018 15:55:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9DC7287F2 for ; Fri, 25 May 2018 15:55:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966980AbeEYPyL (ORCPT ); Fri, 25 May 2018 11:54:11 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:42773 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965666AbeEYPyI (ORCPT ); Fri, 25 May 2018 11:54:08 -0400 Received: by mail-ot0-f195.google.com with SMTP id l13-v6so6569162otk.9; Fri, 25 May 2018 08:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6I60anH+iun6KRqYKM0ViT7vcLGKojFGqanBV9n+GdQ=; b=rAJ6x/NvQDLcxEMKIJA0bFObyZd4cJwOd+5JHHia1H35CbO4GCE26RLDeQ2WO/ccSq Ft/KFpkkh+9hRgnjrxzOnqh+HFBL+np3Ec0hLjaB1SzNMaGttAXMxdEVt82LXHzIXfpa 94/7L2vT/BqH0ahHbWllciHefaUagbRLoyCSDBV41A4x9RiPIqOvD0u+2aVDuPHOaF69 AkgRCIgpRgj8PKdZBoPx0gGHPWwGX0iTyjHQacP2DhCaXTZIx9fONRRGsTI6fkIFIGVm Mf9RQWk2ZY1SlGmA0wszehEZ7pkQYQkvoJUJAw/MdlN8Aiv7oebU/F+Fw1ynIqYgzIhV vs4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6I60anH+iun6KRqYKM0ViT7vcLGKojFGqanBV9n+GdQ=; b=Pz86/jsd07emOhTpKDly2IxfDm+/TsFIbDGJ8LVRNgCOEr68/zn6QEUMGV1Aebix7l 5TiI9d9u6iMnAF59gog0TtiyCh3hhqCsIgwmywxPUNi+b8Lr5NyurVR7MXB+MTSel4Jr qJccKhiY8ut1wgXlzqejx2blV8BpuUan9faXQ1Lxocxprdw7+Wjg+GvfDSPQUZBlT5Uk 63A3TmivSO3cmZvVHrCuV4Drkff3A5WYbApuktPIKfF8dOIfa3GalZ9QvsqHLscdQ7PR vOFjkuI+eBixSnip/LsfibDstdq7PFdDMjzCAsfiZ73roIrILeVfVfTnPjCbDSO3bmoc KM5Q== X-Gm-Message-State: ALKqPwc5GNQb/n61FcPv4qNYzEE+Oc3hr/MufVADMcw+OI9VgrmzO38G gE20eVZnqoPexORI4qOwFzjFASar X-Google-Smtp-Source: ADUXVKLvHtlcGknoy40lJpP5XUdcG3dqDK5bk37C33ZenvmK/M+HxcrAyrkVb8E+opua2E0p1ZAp5w== X-Received: by 2002:a9d:3c73:: with SMTP id j48-v6mr2031139ote.354.1527263647903; Fri, 25 May 2018 08:54:07 -0700 (PDT) Received: from nuclearis2_1.lan (c-98-201-114-184.hsd1.tx.comcast.net. [98.201.114.184]) by smtp.gmail.com with ESMTPSA id o206-v6sm2636856oia.35.2018.05.25.08.54.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 May 2018 08:54:07 -0700 (PDT) From: Alexandru Gagniuc To: linux-acpi@vger.kernel.org Cc: alex_gagniuc@dellteam.com, austin_bolen@dell.com, shyam_iyer@dell.com, Alexandru Gagniuc , Tony Luck , Borislav Petkov , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, "Rafael J. Wysocki" , Len Brown , Mauro Carvalho Chehab , Robert Moore , Erik Schmauss , Tyler Baicar , Will Deacon , James Morse , "Jonathan (Zhixiong) Zhang" , Dongjiu Geng , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, devel@acpica.org Subject: [PATCH v7 1/3] acpi: apei: Rename GHES_SEV_PANIC to GHES_SEV_FATAL Date: Fri, 25 May 2018 10:53:46 -0500 Message-Id: <20180525155352.22350-2-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180525155352.22350-1-mr.nuke.me@gmail.com> References: <20180525155352.22350-1-mr.nuke.me@gmail.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 'GHES_SEV_PANIC' implies that the kernel must panic. That was true many years ago when fatal errors could not be handled and recovered. However, this is no longer the case with PCIe AER and DPC errors. The latter class of errors are contained at the hardware level. 'GHES_SEV_PANIC' is confusing because it implies a policy to crash the system on fatal errors. Drop this questionable policy, and rename the enum to 'GHES_SEV_FATAL' to better convey the meaning. Signed-off-by: Alexandru Gagniuc --- arch/x86/kernel/cpu/mcheck/mce-apei.c | 2 +- drivers/acpi/apei/ghes.c | 11 +++++------ drivers/edac/ghes_edac.c | 2 +- include/acpi/ghes.h | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce-apei.c b/arch/x86/kernel/cpu/mcheck/mce-apei.c index 2eee85379689..cbec89f5cdf0 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-apei.c +++ b/arch/x86/kernel/cpu/mcheck/mce-apei.c @@ -53,7 +53,7 @@ void apei_mce_report_mem_error(int severity, struct cper_sec_mem_err *mem_err) if (severity >= GHES_SEV_RECOVERABLE) m.status |= MCI_STATUS_UC; - if (severity >= GHES_SEV_PANIC) { + if (severity >= GHES_SEV_FATAL) { m.status |= MCI_STATUS_PCC; m.tsc = rdtsc(); } diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 1efefe919555..26a41bbe222b 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -281,10 +281,10 @@ static inline int ghes_severity(int severity) case CPER_SEV_RECOVERABLE: return GHES_SEV_RECOVERABLE; case CPER_SEV_FATAL: - return GHES_SEV_PANIC; + return GHES_SEV_FATAL; default: /* Unknown, go panic */ - return GHES_SEV_PANIC; + return GHES_SEV_FATAL; } } @@ -425,8 +425,7 @@ static void ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata, int * GHES_SEV_RECOVERABLE -> AER_NONFATAL * GHES_SEV_RECOVERABLE && CPER_SEC_RESET -> AER_FATAL * These both need to be reported and recovered from by the AER driver. - * GHES_SEV_PANIC does not make it to this handling since the kernel must - * panic. + * GHES_SEV_FATAL does not make it to this handler */ static void ghes_handle_aer(struct acpi_hest_generic_data *gdata) { @@ -705,7 +704,7 @@ static int ghes_proc(struct ghes *ghes) if (rc) goto out; - if (ghes_severity(ghes->estatus->error_severity) >= GHES_SEV_PANIC) { + if (ghes_severity(ghes->estatus->error_severity) >= GHES_SEV_FATAL) { __ghes_panic(ghes); } @@ -946,7 +945,7 @@ static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) } sev = ghes_severity(ghes->estatus->error_severity); - if (sev >= GHES_SEV_PANIC) { + if (sev >= GHES_SEV_FATAL) { oops_begin(); ghes_print_queued_estatus(); __ghes_panic(ghes); diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index 68b6ee18bea6..8455758327d4 100644 --- a/drivers/edac/ghes_edac.c +++ b/drivers/edac/ghes_edac.c @@ -220,7 +220,7 @@ void ghes_edac_report_mem_error(struct ghes *ghes, int sev, case GHES_SEV_RECOVERABLE: type = HW_EVENT_ERR_UNCORRECTED; break; - case GHES_SEV_PANIC: + case GHES_SEV_FATAL: type = HW_EVENT_ERR_FATAL; break; default: diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h index 8feb0c866ee0..322f7ede24bd 100644 --- a/include/acpi/ghes.h +++ b/include/acpi/ghes.h @@ -49,7 +49,7 @@ enum { GHES_SEV_NO = 0x0, GHES_SEV_CORRECTED = 0x1, GHES_SEV_RECOVERABLE = 0x2, - GHES_SEV_PANIC = 0x3, + GHES_SEV_FATAL = 0x3, }; /* From drivers/edac/ghes_edac.c */