From patchwork Fri May 18 11:20:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 10410741 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 19D98602CB for ; Fri, 18 May 2018 13:13:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06F1228986 for ; Fri, 18 May 2018 13:13:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFB0A28988; Fri, 18 May 2018 13:13:53 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 658A628986 for ; Fri, 18 May 2018 13:13:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CSKbyJ18kd6yfOWJ1vWL3MaGNFdM5EXl2oZwuvvUnxU=; b=hrC7U/M8VWi3Bo XDWdyAVEiN7BsbQemga0kKHbQD8QTJudEUJ6vsWE1im1okKFCZAf02f66LTT9eabWzVSS0WWW+51L lql/kfnRU4rMCftGZXRWGA736wmzbTnB4yBI9xO4+y9pZFXyTcI9GdadKiqZnumJt81MJoJp6x2Tr qw43015heMCAobRAUR0nbXgMuqj09ELLOtjiocM34Wpa/2d8AOOoKBLflAi4cScBDqI1dNjuklLI6 CgPKv4TxPpSHuakhwPbSK16boQkdrMvRP2ZJZgfxbRsMatzW3Xt3/nXSf5dwaV7M2z5w4yI7SVzMl KhEn/f/lj4cdOt0G4VUQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJfCf-00075v-QB; Fri, 18 May 2018 13:13:49 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJfBE-0005JH-Fc for linux-arm-kernel@bombadil.infradead.org; Fri, 18 May 2018 13:12:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Z2iGT+DiJGGA9w4w5abAGBdHYcPX/hjJs+wIFaT2zh4=; b=IESnPGdvVl8jCbsQSXNj5dC0t eGaXJ5df51f8Fa/K7420+7idRmUk78Je0t4Ue6U7ZH1vdkRbxUIrgYVYPzIN7f9t4ZGaLq8PJQRLv WYZWssogs4kkbTjcAH8GKoDaRna0zt9cn04kxSql63k8taT7PMQa8rDOlLz8D8oL18Uh905CTpgNu EBPzb7EuOQp0bomXvkcY/JsWVN2muehYOMxwLygfmxHYxei/N43XC8o0p1RgN5YqRtWEa3WBZ7ek+ i/xggIuKx4nn57hx1UlAdAuabRibdpWWwBKMTfCgDZEcJwyaNawWzCppR/v2UKOCArsh+T1EcEwFS 660pjS1Fg==; Received: from mail.skyhub.de ([2a01:4f8:190:11c2::b:1457]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJdRk-0005Zm-OO for linux-arm-kernel@lists.infradead.org; Fri, 18 May 2018 11:21:18 +0000 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0bE4yq7ZihtE; Fri, 18 May 2018 13:20:45 +0200 (CEST) Received: from pd.tnic (p200300EC2BC87100E112EAEA647B5E34.dip0.t-ipconnect.de [IPv6:2003:ec:2bc8:7100:e112:eaea:647b:5e34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 49EE21EC0333; Fri, 18 May 2018 13:20:45 +0200 (CEST) Date: Fri, 18 May 2018 13:20:28 +0200 From: Borislav Petkov To: James Morse Subject: [PATCH] EDAC, ghes: Make platform-based whitelisting x86-only Message-ID: <20180518112028.GD17285@pd.tnic> References: <1526039543-180996-1-git-send-email-zhengqiang10@huawei.com> <20180511121901.GA12705@pd.tnic> <5AF90C70.408@huawei.com> <20180514094709.GC23049@pd.tnic> <20180514164720.GH23049@pd.tnic> <20180516182958.GB17092@pd.tnic> <8602b133-e0fa-57e2-5159-9d34a1ded85f@arm.com> <20180518111132.GC17285@pd.tnic> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180518111132.GC17285@pd.tnic> User-Agent: Mutt/1.9.3 (2018-01-21) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180518_072116_917025_F1A25945 X-CRM114-Status: GOOD ( 14.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: toshi.kani@hpe.com, Tyler Baicar , linuxarm@huawei.com, mchehab@kernel.org, Zhengqiang , "linux-arm-kernel@lists.infradead.org" , linux-edac@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Borislav Petkov ARM machines all have DMI tables so if they request hw error reporting through GHES, then the driver should be able to detect DIMMs and report errors successfully (famous last words :)). Make the platform-based list x86-specific so that ghes_edac can load on ARM. Signed-off-by: Borislav Petkov Reviewed-by: James Morse Tested-by: James Morse Cc: Qiang Zheng Link: https://lkml.kernel.org/r/1526039543-180996-1-git-send-email-zhengqiang10@huawei.com Tested-by: Qiang Zheng Tested-by: Tyler Baicar --- drivers/edac/ghes_edac.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index 863fbf3db29f..473aeec4b1da 100644 --- a/drivers/edac/ghes_edac.c +++ b/drivers/edac/ghes_edac.c @@ -440,12 +440,16 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev) struct mem_ctl_info *mci; struct edac_mc_layer layers[1]; struct ghes_edac_dimm_fill dimm_fill; - int idx; + int idx = -1; - /* Check if safe to enable on this system */ - idx = acpi_match_platform_list(plat_list); - if (!force_load && idx < 0) - return -ENODEV; + if (IS_ENABLED(CONFIG_X86)) { + /* Check if safe to enable on this system */ + idx = acpi_match_platform_list(plat_list); + if (!force_load && idx < 0) + return -ENODEV; + } else { + idx = 0; + } /* * We have only one logical memory controller to which all DIMMs belong.