Received: by 10.223.164.202 with SMTP id h10csp3585831wrb; Tue, 28 Nov 2017 13:49:58 -0800 (PST) X-Google-Smtp-Source: AGs4zMadQr9+0tp39DZ4Vks2u+3VbSD6XxoKT0cQRc7KATRN6zzJGYs1cgLvhONG0f27VT7tpc6p X-Received: by 10.99.98.194 with SMTP id w185mr564570pgb.396.1511905798333; Tue, 28 Nov 2017 13:49:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511905798; cv=none; d=google.com; s=arc-20160816; b=ApPe0x9jvfveU7qmThgU+O1eBgms5BgitXMOfTtwXogoDTLFu+Yy7ELxnoJ/3Vf3+B /nwzPkEhIpsN1J7k7g9q2rkCN6q1cLNdz6j2pMK6RymTHdQZIlTWx8ih02ScVWsBLwfh vCTsbmFmtunbwCQ1MkHWZCO8c3sOJBH3t4bK/XiKNQd+n9fuOjySae/MLNNpb4RcJw/E x0kAYJucR81JWgVgFULPr6vDnadTJAXrocLzKuECYK1pLNbJ16PGkB0+F1CM/JQnBaHA UaTmZY2osgXNTqLNK5EE8AhUVtsgLXR4otLnaK+X6JFE0ZpW33q2Sm48taWc/k1AheXL ikjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=A6BZNzNEVQflrj/AvVs59JEz8wHGadFC0P8c8zc+lMA=; b=FwuHTyTLyfX3sigYLk01vXWCpKedw8KKQBouApd6CjAy8HozUyruVSJeaXHJ/6t254 SCv/7U6xqhSwKwZqUeIgHFlPr8AJhmjp9EitSUupeQk8X1AjtoBjhD4DkYfQi1T+Bbca ITuL/3kq06NP1H0ft/biY/84PxjXlK9gESNnAiyDGgTKfHgQ+W5gz5I3AjjaDaDXlnBr CTv4FN9VdNU+E04BKcQENipMwTDLEAStCj8FF+o9n0yyICXyDd/tmGJRYZeHEW1gwHJA M5web5UrzhPn1tiijkcTbZoZqmmoBaecmMK6QYP+dQCFznWOs3at802tgERiNdFnmNb1 W+0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=hbgqA4Jd; dkim=pass header.i=@codeaurora.org header.s=default header.b=coBLOG4T; 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 f67si90295pgc.640.2017.11.28.13.49.47; Tue, 28 Nov 2017 13:49:58 -0800 (PST) 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=@codeaurora.org header.s=default header.b=hbgqA4Jd; dkim=pass header.i=@codeaurora.org header.s=default header.b=coBLOG4T; 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 S1752746AbdK1Vsr (ORCPT + 70 others); Tue, 28 Nov 2017 16:48:47 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:37776 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752219AbdK1Vsb (ORCPT ); Tue, 28 Nov 2017 16:48:31 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 03ABA6044B; Tue, 28 Nov 2017 21:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511905711; bh=mitSHP0KxTo+O00TUq2j84VeA3ATa7UUBBIx0hLUNso=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hbgqA4JdqvRfesskFmSeV7AZgaw67qGc998l+yyz8QtB0OaUiDcevYOwTQ1kEVwD2 xJOh6joyZoJ4Qrn8XQCC3dAxowOTsXLpud034OMap8Kng7vqwxFc9/6NSPjx5nVYrV kklq6I9vm8lllGURF5BMv9CZJ/voXa7419UTz2yM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from thunderhorn.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tbaicar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4AA1760350; Tue, 28 Nov 2017 21:48:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511905710; bh=mitSHP0KxTo+O00TUq2j84VeA3ATa7UUBBIx0hLUNso=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=coBLOG4TM+dDqWQqIudG294BpukFQO2mWDRbyB9f2kicr4BAWSePIPtynvpD2ycxo D9JOX1X8Lx98sqpX2A51on2F4LLCdNE0j4wI/7Pnzg+lQ1tEvHUVOP7e5KFElB2KX4 s7OXPXZ+4gbxYzYVPbvPrxi3G2ZSH63ephbvcFXc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4AA1760350 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=tbaicar@codeaurora.org From: Tyler Baicar To: rjw@rjwysocki.net, tony.luck@intel.com, will.deacon@arm.com, james.morse@arm.com Cc: bp@suse.de, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Tyler Baicar Subject: [PATCH V4 2/2] acpi: apei: call into AER handling regardless of severity Date: Tue, 28 Nov 2017 16:48:09 -0500 Message-Id: <1511905689-11522-3-git-send-email-tbaicar@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1511905689-11522-1-git-send-email-tbaicar@codeaurora.org> References: <1511905689-11522-1-git-send-email-tbaicar@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the GHES code only calls into the AER driver for recoverable type errors. This is incorrect because errors of other severities do not get logged by the AER driver and do not get exposed to user space via the AER trace event. So, call into the AER driver for PCIe errors regardless of the severity Signed-off-by: Tyler Baicar Reviewed-by: Borislav Petkov --- drivers/acpi/apei/ghes.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index f67eb76..cc65d19 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -414,14 +414,26 @@ static void ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata, int #endif } -static void ghes_handle_aer(struct acpi_hest_generic_data *gdata, int sev, int sec_sev) +/* + * PCIe AER errors need to be sent to the AER driver for reporting and + * recovery. The GHES severities map to the following AER severities and + * require the following handling: + * + * GHES_SEV_CORRECTABLE -> AER_CORRECTABLE + * These need to be reported by the AER driver but no recovery is + * necessary. + * 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. + */ +static void ghes_handle_aer(struct acpi_hest_generic_data *gdata) { #ifdef CONFIG_ACPI_APEI_PCIEAER struct cper_sec_pcie *pcie_err = acpi_hest_get_payload(gdata); - if (sev == GHES_SEV_RECOVERABLE && - sec_sev == GHES_SEV_RECOVERABLE && - pcie_err->validation_bits & CPER_PCIE_VALID_DEVICE_ID && + if (pcie_err->validation_bits & CPER_PCIE_VALID_DEVICE_ID && pcie_err->validation_bits & CPER_PCIE_VALID_AER_INFO) { unsigned int devfn; int aer_severity; @@ -475,7 +487,7 @@ static void ghes_do_proc(struct ghes *ghes, ghes_handle_memory_failure(gdata, sev); } else if (guid_equal(sec_type, &CPER_SEC_PCIE)) { - ghes_handle_aer(gdata, sev, sec_sev); + ghes_handle_aer(gdata); } else if (guid_equal(sec_type, &CPER_SEC_PROC_ARM)) { struct cper_sec_proc_arm *err = acpi_hest_get_payload(gdata); -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. From 1585315692331157663@xxx Tue Nov 28 13:14:19 +0000 2017 X-GM-THRID: 1584183523689729523 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread