From patchwork Mon Jun 4 15:04:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Alex G." X-Patchwork-Id: 10446803 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 DDB0360375 for ; Mon, 4 Jun 2018 15:06:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB62D288B3 for ; Mon, 4 Jun 2018 15:06:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9A9A288CD; Mon, 4 Jun 2018 15:06:12 +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 63C59288B3 for ; Mon, 4 Jun 2018 15:06:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753706AbeFDPFE (ORCPT ); Mon, 4 Jun 2018 11:05:04 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:39606 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753606AbeFDPFB (ORCPT ); Mon, 4 Jun 2018 11:05:01 -0400 Received: by mail-oi0-f67.google.com with SMTP id t22-v6so25277814oih.6; Mon, 04 Jun 2018 08:05:01 -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=v+CqfaeguA4WJltqTnatTo3KOzJr9u2upWsl3cV8n0s=; b=TFnA7wb+MLiuYHKYHg5SiUrmYyxPLTHZrMDnFVQg1bEae31M7Lkq2Rwv/h3NG5TklW gx9MXqdHsiXbXZkbw3PSgfriPiF8aJz6C2f+5ATTFb/gyhleX8qweoseChXK4iM582i4 LAqOSySwBWu+6ue4Y1A3n/PT89GzbSDdM+fv8kot5qYaQXVpPd9q+boWXbRO6mp6UaSg vK0nd5uop1sPq+Sp2Ll/ow/UFiENv/hAjBcVc8Tu7BziEpO5/W6TPY06J9UVi1iOdXOx zTC7mu/LMUrbyhP0cf5PNfmY21JBKamnSCHZw8zm3QnbWxfYcfiu1CkvPa7dbd54bSfV LP9g== 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=v+CqfaeguA4WJltqTnatTo3KOzJr9u2upWsl3cV8n0s=; b=Xhb8lo/T/x3fLkMF5C1aXpiiwpbzkAK1xWJIzTahJcA0iPU4oiQr/U/yDSctaL3/uD iJG3pAEllARSkj4vFGmZnZtDlvmF+g4zTBYALli6fQ0FudG5dz5Zx1dv8Z9Gg7X/6yMO y79NTDComYy1Dc2ZH03g6QqUI3a6ubl+jiy667FmcLbIiKj+wmu1A8McoQegVTk/I8VC TkeS4FhC79j9SAUEXRBGFTNrbu0s+RrD6/xTCHvcLBhs8e7Qv+EJIBNdB87iAveScDaD 7lzfIien/3ErIUpNRcne7nM0/SLiskYYQQhJdmkuAwI5Rmtsm8v+/RxJOOVSOAn1jHc9 nWEQ== X-Gm-Message-State: APt69E0ZvhBzfJRPIh+0MFPJyEXDGWYyEq7xNvm8OKVS8tCRl/nXtN/q Im7UdmdYMVXg+OTaNz7wSXsPB5yxKQWauA== X-Google-Smtp-Source: ADUXVKJaBhQYFuWwT2cN5OYTBvH6L9sdVa/k2/PAcE1LXuJk8HiSCB7+I5i8ruWtCFYWaBADp56eHw== X-Received: by 2002:aca:654d:: with SMTP id j13-v6mr2939396oiw.0.1528124700495; Mon, 04 Jun 2018 08:05:00 -0700 (PDT) Received: from austins740xd.raid.adc.delllabs.net ([143.166.81.254]) by smtp.gmail.com with ESMTPSA id n72-v6sm3878332oig.6.2018.06.04.08.04.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Jun 2018 08:04:59 -0700 (PDT) From: mrnuke X-Google-Original-From: mrnuke To: linux-acpi@vger.kernel.org, tony.luck@intel.com Cc: alex_gagniuc@dellteam.com, austin_bolen@dell.com, shyam_iyer@dell.com, Alexandru Gagniuc , 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 v8 1/3] acpi: apei: Rename GHES_SEV_PANIC to GHES_SEV_FATAL Date: Mon, 4 Jun 2018 10:04:38 -0500 Message-Id: <20180604150443.1265-2-mrnuke@austins740xd.dell> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180604150443.1265-1-mrnuke@austins740xd.dell> References: <20180604150443.1265-1-mrnuke@austins740xd.dell> 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 From: Alexandru Gagniuc '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 */