Message ID | 20221018082214.569504-1-justin.he@arm.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1842751wrs; Tue, 18 Oct 2022 01:39:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5J8yQKLWgaIs8wu5rEpgjc7Y0we4GjIhhfRnvTVSo/6dZPp00jfP1xthNuh+z1raQ2lHeF X-Received: by 2002:a63:5811:0:b0:43c:9d3d:700a with SMTP id m17-20020a635811000000b0043c9d3d700amr1778774pgb.419.1666082384563; Tue, 18 Oct 2022 01:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666082384; cv=none; d=google.com; s=arc-20160816; b=JnBTb/R0zahezIAR3tO0rBKRlyOhRVCWz0dOZP0hW3ceHSUPJ9BL2MDZ6s3JWUxtfd RtQlXUHIuMsJQDAh+MpOU5U2mxgqUnWM1bQ7MoOuvOqI6NZmaBR6c3qOEGbI1nMXyenT QPGB5alRfLLhnray79Y1iN7yyqdHuB6NydMKEtIOk67Z0Ri5wAvMwvnhXw4XoK+22ulU wlUEqnMh+AtkZ+Jkx7E8YjFxGd5SoI+pws9vhBkxNz8vm+HfDmuLNd1IWpNLCmoywFxX 5j3FDsgvpvhBiFo+uptH4Z3YdABu/Kvwpi5PwbTj4VQrJwWQJPlqsTsa5yyH0t7h6By0 A4HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=DItKFNVkJ6vVjIs4ZwJUCSj0/g9xkjPSw9RDblWahjA=; b=zIqOvY2hEyiUjfBuOm362PY6T0i5X/spUsz1GEitdtqOCRVQRvZBCSCFFJSWseU29L 9K53RT483BCVW9f5mI4ZSlqQ7XwyCPAEw4AZmHpa67+kO+81Qp3Vq4HCNbbE1Zwxxv6P obP1f0CGj5d42iuvZU0XVKN76ow7LfH/ShyDObtf/jObVFgjbKLAA7T2dT/FCIQ6zQ/H XYIGHdRppyPYnEQvaHWbJUc73AGkm5krh+UeNFXebkLAcPLWa4QsIAL6DzcWV8pDVrOT CvwmP+uvrHUQBlF4d2F8lwyMRhwTB+j5O8IVr4k4v8PD9ZGyZ/KgIbVVtz5kVmmEkI1K TJ4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m5-20020a63fd45000000b004561c1f132csi15032911pgj.346.2022.10.18.01.39.31; Tue, 18 Oct 2022 01:39:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229922AbiJRI1P (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Tue, 18 Oct 2022 04:27:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230235AbiJRI1N (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Oct 2022 04:27:13 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F99975495; Tue, 18 Oct 2022 01:27:12 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C9EAF113E; Tue, 18 Oct 2022 01:27:17 -0700 (PDT) Received: from entos-ampere-02.shanghai.arm.com (entos-ampere-02.shanghai.arm.com [10.169.212.212]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DC9253F7D8; Tue, 18 Oct 2022 01:27:04 -0700 (PDT) From: Jia He <justin.he@arm.com> To: Ard Biesheuvel <ardb@kernel.org>, Len Brown <lenb@kernel.org>, Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>, Mauro Carvalho Chehab <mchehab@kernel.org>, Robert Richter <rric@kernel.org>, Robert Moore <robert.moore@intel.com>, Qiuxu Zhuo <qiuxu.zhuo@intel.com>, Yazen Ghannam <yazen.ghannam@amd.com>, Jan Luebbe <jlu@pengutronix.de>, Khuong Dinh <khuong@os.amperecomputing.com>, Kani Toshi <toshi.kani@hpe.com> Cc: James Morse <james.morse@arm.com>, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, devel@acpica.org, "Rafael J . Wysocki" <rafael@kernel.org>, Shuai Xue <xueshuai@linux.alibaba.com>, Jarkko Sakkinen <jarkko@kernel.org>, linux-efi@vger.kernel.org, nd@arm.com, Peter Zijlstra <peterz@infradead.org>, Jia He <justin.he@arm.com> Subject: [PATCH v10 0/7] Make ghes_edac a proper module Date: Tue, 18 Oct 2022 08:22:07 +0000 Message-Id: <20221018082214.569504-1-justin.he@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747014002554122384?= X-GMAIL-MSGID: =?utf-8?q?1747014002554122384?= |
Series |
Make ghes_edac a proper module
|
|
Message
Justin He
Oct. 18, 2022, 8:22 a.m. UTC
Commit dc4e8c07e9e2 ("ACPI: APEI: explicit init of HEST and GHES in apci_init()") introduced a bug that ghes_edac_register() would be invoked before edac_init(). Because at that time, the bus "edac" hasn't been even registered, this created sysfs /devices/mc0 instead of /sys/devices/system/edac/mc/mc0 on an Ampere eMag server. The solution is to make ghes_edac a proper module. Changelog: v10: - add the RCU_INITIALIZER and use the unrcu_pointer wrap for victim v9:https://lore.kernel.org/lkml/20221017130140.420986-1-justin.he@arm.com/ - drop the unrcu_pointer patch 06 of v8 - add Ard's xchg_release patch to use a better memory barrier v8:https://lore.kernel.org/lkml/20221010023559.69655-1-justin.he@arm.com/ - merge v7 two force_enable and ghes_get_devices() patches into one - make force_enable static v7:https://lore.kernel.org/lkml/20220929023726.73727-1-justin.he@arm.com/ - remove the ghes_edac_preferred and ghes_present (suggested by Borislav) - adjust the patch splitting, no major functional changes - remove the r-b tag in those changed patches v6:https://www.spinics.net/lists/kernel/msg4511453.html - no code changes from v5 patches - add the reviewed and acked by from Toshi - describe the removal of ghes_edac_force_enable checking in Patch 05 v5: https://www.spinics.net/lists/kernel/msg4502787.html - add the review-by from Toshi for patch 04 and 06 - refine the commit msg - remove the unconditional set of ghes_edac_force_enable on Arm v4: https://lore.kernel.org/lkml/20220831074027.13849-6-justin.he@arm.com/ - move the kernel boot option to ghes module parameter - collapse th ghes_present and ghes_edac_preferred into one patch v3: https://lore.kernel.org/lkml/20220822154048.188253-1-justin.he@arm.com/ - refine the commit logs - introduce ghes preferred and present flag (by Toshi) - move force_load to setup parameter - add the ghes_edac_preferred() check for x86/Arm edac drivers v2: https://lore.kernel.org/lkml/20220817143458.335938-1-justin.he@arm.com/ - add acked-by tag of Patch 1 from Ard - split the notifier patch - add 2 patch to get regular drivers selected when ghes edac is not loaded - fix an errno in igen6 driver - add a patch to fix the sparse warning of ghes - refine the commit logs v1: https://lore.kernel.org/lkml/20220811091713.10427-1-justin.he@arm.com/ Ard Biesheuvel (1): apei/ghes: Use xchg_release() for updating new cache slot instead of cmpxchg() Jia He (6): efi/cper: export several helpers for ghes_edac to use EDAC/ghes: Add a notifier for reporting memory errors EDAC/ghes: Prepare to make ghes_edac a proper module EDAC/ghes: Make ghes_edac a proper module to remove the dependency on ghes EDAC: Add the ghes_get_devices() check for chipset-specific edac drivers EDAC/igen6: Return consistent errno when another edac driver is enabled drivers/acpi/apei/ghes.c | 111 +++++++++++++++++++++++++-------- drivers/edac/Kconfig | 4 +- drivers/edac/amd64_edac.c | 3 + drivers/edac/armada_xp_edac.c | 3 + drivers/edac/edac_module.h | 1 + drivers/edac/ghes_edac.c | 90 +++++++++++++++----------- drivers/edac/i10nm_base.c | 3 + drivers/edac/igen6_edac.c | 5 +- drivers/edac/layerscape_edac.c | 3 + drivers/edac/pnd2_edac.c | 3 + drivers/edac/sb_edac.c | 3 + drivers/edac/skx_base.c | 3 + drivers/edac/thunderx_edac.c | 3 + drivers/edac/xgene_edac.c | 3 + drivers/firmware/efi/cper.c | 3 + include/acpi/ghes.h | 34 +++------- 16 files changed, 187 insertions(+), 88 deletions(-)
Comments
On Tue, Oct 18, 2022 at 08:22:07AM +0000, Jia He wrote: > Commit dc4e8c07e9e2 ("ACPI: APEI: explicit init of HEST and GHES in > apci_init()") introduced a bug that ghes_edac_register() would be invoked > before edac_init(). Because at that time, the bus "edac" hasn't been even > registered, this created sysfs /devices/mc0 instead of > /sys/devices/system/edac/mc/mc0 on an Ampere eMag server. > > The solution is to make ghes_edac a proper module. > > Changelog: > v10: All queued, thanks for the effort. It'll appear in Linux next soon.
> -----Original Message----- > From: Borislav Petkov <bp@alien8.de> > Sent: Tuesday, October 25, 2022 10:08 PM > To: Justin He <Justin.He@arm.com> > Cc: Ard Biesheuvel <ardb@kernel.org>; Len Brown <lenb@kernel.org>; Tony > Luck <tony.luck@intel.com>; Mauro Carvalho Chehab > <mchehab@kernel.org>; Robert Richter <rric@kernel.org>; Robert Moore > <robert.moore@intel.com>; Qiuxu Zhuo <qiuxu.zhuo@intel.com>; Yazen > Ghannam <yazen.ghannam@amd.com>; Jan Luebbe <jlu@pengutronix.de>; > Khuong Dinh <khuong@os.amperecomputing.com>; Kani Toshi > <toshi.kani@hpe.com>; James Morse <James.Morse@arm.com>; > linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; > linux-edac@vger.kernel.org; devel@acpica.org; Rafael J . Wysocki > <rafael@kernel.org>; Shuai Xue <xueshuai@linux.alibaba.com>; Jarkko > Sakkinen <jarkko@kernel.org>; linux-efi@vger.kernel.org; nd <nd@arm.com>; > Peter Zijlstra <peterz@infradead.org> > Subject: Re: [PATCH v10 0/7] Make ghes_edac a proper module > > On Tue, Oct 18, 2022 at 08:22:07AM +0000, Jia He wrote: > > Commit dc4e8c07e9e2 ("ACPI: APEI: explicit init of HEST and GHES in > > apci_init()") introduced a bug that ghes_edac_register() would be > > invoked before edac_init(). Because at that time, the bus "edac" > > hasn't been even registered, this created sysfs /devices/mc0 instead > > of > > /sys/devices/system/edac/mc/mc0 on an Ampere eMag server. > > > > The solution is to make ghes_edac a proper module. > > > > Changelog: > > v10: > > All queued, thanks for the effort. > > It'll appear in Linux next soon. > Thanks for your help and patience 😊 -- Cheers, Justin (Jia He)