From patchwork Thu Aug 3 21:57:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kani, Toshi" X-Patchwork-Id: 9879949 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 9F3D2603F4 for ; Thu, 3 Aug 2017 22:10:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B045288DF for ; Thu, 3 Aug 2017 22:10:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F9C02897C; Thu, 3 Aug 2017 22:10:21 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 D2942288DF for ; Thu, 3 Aug 2017 22:10:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752169AbdHCWJC (ORCPT ); Thu, 3 Aug 2017 18:09:02 -0400 Received: from g2t2353.austin.hpe.com ([15.233.44.26]:47054 "EHLO g2t2353.austin.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752005AbdHCWHc (ORCPT ); Thu, 3 Aug 2017 18:07:32 -0400 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id 3D85369; Thu, 3 Aug 2017 22:07:30 +0000 (UTC) Received: from misato.americas.hpqcorp.net (unknown [10.34.81.122]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id B42EE40; Thu, 3 Aug 2017 22:07:29 +0000 (UTC) From: Toshi Kani To: rjw@rjwysocki.net, bp@alien8.de Cc: mchehab@kernel.org, tony.luck@intel.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Toshi Kani Subject: [PATCH v2 3/7] ACPI / APEI: add OSC APEI bit check for ghes_edac Date: Thu, 3 Aug 2017 15:57:49 -0600 Message-Id: <20170803215753.30553-4-toshi.kani@hpe.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170803215753.30553-1-toshi.kani@hpe.com> References: <20170803215753.30553-1-toshi.kani@hpe.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 When 'osc_sb_apei_support_acked' is set, it indicates that the platform supports APEI, firmware-first mode, as ACPI _OSC capability bit 4, APEI Support, was set in query. While _OSC is an optional method, platforms with APEI support should implement it to inform its capability to the OS properly. Add check to 'osc_sb_apei_support_acked' before calling ghes_edac_register() to restrict that ghes_edac is enabled on platforms with APEI support capability set in _OSC. Signed-off-by: Toshi Kani Cc: "Rafael J. Wysocki" Cc: Borislav Petkov Cc: Mauro Carvalho Chehab Cc: Tony Luck --- drivers/acpi/apei/ghes.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index d661d45..49d75eb 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -1139,9 +1139,11 @@ static int ghes_probe(struct platform_device *ghes_dev) goto err; } - rc = ghes_edac_register(ghes, &ghes_dev->dev); - if (rc < 0) - goto err; + if (osc_sb_apei_support_acked) { + rc = ghes_edac_register(ghes, &ghes_dev->dev); + if (rc < 0) + goto err; + } switch (generic->notify.type) { case ACPI_HEST_NOTIFY_POLLED: