From patchwork Tue Apr 3 17:08:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Alex G." X-Patchwork-Id: 10321583 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 AA3A5602C8 for ; Tue, 3 Apr 2018 17:09:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97EDA2580E for ; Tue, 3 Apr 2018 17:09:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 879892856B; Tue, 3 Apr 2018 17:09:46 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham 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 243F02580E for ; Tue, 3 Apr 2018 17:09:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751649AbeDCRJL (ORCPT ); Tue, 3 Apr 2018 13:09:11 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:44242 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752622AbeDCRIx (ORCPT ); Tue, 3 Apr 2018 13:08:53 -0400 Received: by mail-oi0-f67.google.com with SMTP id j143-v6so16613810oih.11; Tue, 03 Apr 2018 10:08:53 -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=5OkWR/G9urwuoz96pd7pM8zq9GG+fGcRdxKL3xDp7SA=; b=ipHjAU4aL5GY7g3JAAuK8q4vNKmKiYHczMNqdiZuIurMVmHt/fUeIN48cAlEJbwLj5 ydBmkzdrfElXdoUDVmXtGA9TG7fkLPFGPEyBsyHqvuZ5jqiDbeyglHA6RZhsiel+YKq7 yXeYcNleT2AdozhZJZChBKmE5ko5TdOcoBshZvxfLo7IZOaF9Dgu++dnJp8nA+IBC2sZ hsnwFljsRN0vLKbOx0/dlXbwCUHCINRZJxQ8iKDxQi5d9kErODh7YuHL0cc3Mr2YR36w PQVvqi6y8b0qsvfBWOnZB6iWKn0+8HHNEtEI3FXetZiaemaYOhmFf6LEJcBjSSV1CnZ0 x7rw== 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=5OkWR/G9urwuoz96pd7pM8zq9GG+fGcRdxKL3xDp7SA=; b=VlteqSmYJseUJrNZjpBhWqNHoz+Bf62blKpo7BCQTVW5nTFf11ho72gvcRw/vjXUai TwehXlpuEfws7Y6IkRLxRpaxs+uMutlmD+sZSmZj1JhuooAWVGemZM+8Nihnbhbwjxpc lKb8Veza4jkYGB/+/DfPJ1Kp0+8C61Cl2rlF8pSAAI9oguSxIBltxLAImxt+BUZPGRev JWMu5Mi2w4UOS5mXKcVLyiFG4TQLXWVqM2s0FAzOHCmCyOcvS1PFjuNIti3JYjMrM8s1 /I82vUt3E493zXXvQGshr17enETfy3cta+weYJHpc0IUtAzJVZ+6J+ZR4DmnGc9nPxJh CjZw== X-Gm-Message-State: ALQs6tANjWvpKQxmXonYGRqXwHRy66jrR7TNLx0GTe0XPUZbRautyDxl PXb6uCzFXEt7GUz+kZ4DUz7D+hiG X-Google-Smtp-Source: AIpwx487ME9ASyz5rGwXJvhEiQq9YUjf6YT/hNgIjwLF+fO3b80aGB029TuHIm9rZAOU0MtWLTuQwA== X-Received: by 2002:a54:4e8f:: with SMTP id c15-v6mr5673267oiy.0.1522775333101; Tue, 03 Apr 2018 10:08:53 -0700 (PDT) Received: from nuclearis2_1.lan (c-98-197-2-30.hsd1.tx.comcast.net. [98.197.2.30]) by smtp.gmail.com with ESMTPSA id p35-v6sm1763878ota.72.2018.04.03.10.08.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Apr 2018 10:08:52 -0700 (PDT) From: Alexandru Gagniuc To: linux-acpi@vger.kernel.org Cc: rjw@rjwysocki.net, lenb@kernel.org, tony.luck@intel.com, bp@alien8.de, tbaicar@codeaurora.org, will.deacon@arm.com, james.morse@arm.com, shiju.jose@huawei.com, zjzhang@codeaurora.org, gengdongjiu@huawei.com, linux-kernel@vger.kernel.org, alex_gagniuc@dellteam.com, austin_bolen@dell.com, shyam_iyer@dell.com, Alexandru Gagniuc Subject: [RFC PATCH 4/4] acpi: apei: Warn when GHES marks correctable errors as "fatal" Date: Tue, 3 Apr 2018 12:08:30 -0500 Message-Id: <20180403170830.29282-5-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180403170830.29282-1-mr.nuke.me@gmail.com> References: <20180403170830.29282-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 There seems to be a culture amongst BIOS teams to want to crash the OS when an error can't be handled in firmware. Marking GHES errors as "fatal" is a very common way to do this. However, a number of errors reported by GHES may be fatal in the sense a device or link is lost, but are not fatal to the system. When there is a disagreement with firmware about the handleability of an error, print a warning message. Signed-off-by: Alexandru Gagniuc --- drivers/acpi/apei/ghes.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 7243a99ea57e..d9123c5fa3d9 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -521,6 +521,11 @@ static int ghes_do_proc(struct ghes *ghes, corrected_sev = max(corrected_sev, sec_sev); } + + if ((sev >= GHES_SEV_PANIC) && (corrected_sev < sev)) { + pr_warn("FIRMWARE BUG: Firmware sent fatal error that we were able to correct"); + pr_warn("BROKEN FIRMWARE: Complain to your hardware vendor"); + } return corrected_sev; }