Message ID | 20221116003729.194802-1-jbaron@akamai.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3018894wru; Tue, 15 Nov 2022 16:40:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf6WyDaHmP0WqZSVRJaFpFSHpC7vbpbB/JGDnzEsVjREv1/Al6etvZmuQ76INcOySy3FACEU X-Received: by 2002:a17:906:7f92:b0:78d:4e5b:ffaa with SMTP id f18-20020a1709067f9200b0078d4e5bffaamr15144201ejr.455.1668559224264; Tue, 15 Nov 2022 16:40:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668559224; cv=none; d=google.com; s=arc-20160816; b=blpXnkpIrLGUJUQiYx0HndHds0xyI32jMpt/1YRgEs1QZQRup78WVxAjqei9MNdnU8 q6R3DOxE8k6YWa+lqFlk66gzlTKBRviumh2rQtnIvS5EfPNDiO4LGgNOXv0HfK4W587x ajaKYYhBoADhiQH3D2QHsLIQJZCJAUPdFdmetWhNBcU7rlogzzNW/kkVKoix6prAFnNI 1mAIKgpUMtFhHBVB+jt0HME8i5s5qwdVu7eSZulWR13+pt71tbZnW4KXNVXjbc/iCFe3 hpJxn4QK3Kn8ClVdx3d1O/ed0p+c3uPMx0yu/4L5WgBnI47185ZBdOe/DJ6GAiD1AP80 6DWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=1iS3lrEK+tv0cCqy+H0HiSOeS346CRjJ8p8wkeyh3RI=; b=hyuPomweRvy39pDMDdQdyBjq8oDc2onsPCfIMtix/4koUalRxFW45phM+IVRVpy+wL c3Eg3qvlYmHskp1O6EfXCyPzYHxJObL3oOz600do1fQBUkgkbsPlTvtgKwPVQl3uQsC0 FWPu5wm2dyXlMF6Acr92T8K93zlBP9U4sVeEOW0DwW3Yg6ftJaiX70rH1pYonkgwBO/0 BtWzPenjxcHtyhhBMZQ5jvqrFu0VGSPqYQn9fWTcTThCqmK9e450IXdEyTAi7UiTKr3G msZX0g6Qu7TOnDgiYMplc58Pye50nVNp4UacN7PQ1EAlv7Mg4t32Fd9ynrt+bDlCyTOt bTgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@akamai.com header.s=jan2016.eng header.b=K1Fw+0Bb; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=akamai.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc7-20020a1709071c0700b0078da856a4ecsi14408108ejc.391.2022.11.15.16.39.59; Tue, 15 Nov 2022 16:40:24 -0800 (PST) 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; dkim=pass header.i=@akamai.com header.s=jan2016.eng header.b=K1Fw+0Bb; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=akamai.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231232AbiKPAjT (ORCPT <rfc822;maxim.cournoyer@gmail.com> + 99 others); Tue, 15 Nov 2022 19:39:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231150AbiKPAjP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 15 Nov 2022 19:39:15 -0500 Received: from mx0a-00190b01.pphosted.com (mx0a-00190b01.pphosted.com [IPv6:2620:100:9001:583::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72F402C660; Tue, 15 Nov 2022 16:39:11 -0800 (PST) Received: from pps.filterd (m0050095.ppops.net [127.0.0.1]) by m0050095.ppops.net-00190b01. (8.17.1.19/8.17.1.19) with ESMTP id 2AG09sL0014656; Wed, 16 Nov 2022 00:38:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=from : to : cc : subject : date : message-id; s=jan2016.eng; bh=1iS3lrEK+tv0cCqy+H0HiSOeS346CRjJ8p8wkeyh3RI=; b=K1Fw+0Bb/Bu0Pg7Rqlj3v7rM3u21n5liBVKlF2RBXevI/2PmBgiUwlEz6gllcMIToPAV Lk1U8FHZR60C5rMhPVOaxj0ybDMzRdQb3nWF4eivNySg397SPrM2sKdUwE2/FBxlr8xs eJZIR0BW7SgMRNiooFodn0Ro4T+urI+voHVJVjqH5zwuhaHKjYi+ZUhSnCM4TPcN5H8K p3eQmi65T5OF37Stx/eRaTbW/cyqS2umVVjhIQN/7B7iMCKHOgUTf7E4q9BA4ZwuHrUG vW18r+Qmozx7cZUDBTWNigtdldmaRaOzkQoPNTyIeH4duBMpjOcpw1PnmLdePV7Oa3Dv OA== Received: from prod-mail-ppoint4 (a72-247-45-32.deploy.static.akamaitechnologies.com [72.247.45.32] (may be forged)) by m0050095.ppops.net-00190b01. (PPS) with ESMTPS id 3kvn2u0qm4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 00:38:46 +0000 Received: from pps.filterd (prod-mail-ppoint4.akamai.com [127.0.0.1]) by prod-mail-ppoint4.akamai.com (8.17.1.5/8.17.1.5) with ESMTP id 2AG0bPo8011542; Tue, 15 Nov 2022 19:38:45 -0500 Received: from prod-mail-relay19.dfw02.corp.akamai.com ([172.27.165.173]) by prod-mail-ppoint4.akamai.com (PPS) with ESMTP id 3kt7q44b6f-1; Tue, 15 Nov 2022 19:38:45 -0500 Received: from bos-lhv9ol.bos01.corp.akamai.com (bos-lhv9ol.bos01.corp.akamai.com [172.28.222.101]) by prod-mail-relay19.dfw02.corp.akamai.com (Postfix) with ESMTP id DFE0D60246; Wed, 16 Nov 2022 00:38:44 +0000 (GMT) From: Jason Baron <jbaron@akamai.com> To: bp@alien8.de Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab <mchehab@kernel.org>, Tony Luck <tony.luck@intel.com>, James Morse <james.morse@arm.com>, Robert Richter <rric@kernel.org>, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>, Shuai Xue <xueshuai@linux.alibaba.com>, stable@vger.kernel.org Subject: [PATCH] EDAC/edac_module: order edac_init() before ghes_edac_register() Date: Tue, 15 Nov 2022 19:37:29 -0500 Message-Id: <20221116003729.194802-1-jbaron@akamai.com> X-Mailer: git-send-email 2.17.1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-15_08,2022-11-15_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 suspectscore=0 bulkscore=0 malwarescore=0 spamscore=0 mlxlogscore=990 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211160002 X-Proofpoint-GUID: h6FjdD_WwI_joBIgADWM-Ow_K8zJZBOr X-Proofpoint-ORIG-GUID: h6FjdD_WwI_joBIgADWM-Ow_K8zJZBOr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-15_08,2022-11-15_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 priorityscore=1501 suspectscore=0 mlxscore=0 mlxlogscore=893 bulkscore=0 clxscore=1011 spamscore=0 impostorscore=0 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211160001 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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?1749611156909675675?= X-GMAIL-MSGID: =?utf-8?q?1749611156909675675?= |
Series |
EDAC/edac_module: order edac_init() before ghes_edac_register()
|
|
Commit Message
Jason Baron
Nov. 16, 2022, 12:37 a.m. UTC
Currently, ghes_edac_register() is called via ghes_init() from acpi_init()
at the subsys_initcall() level. However, edac_init() is also called from
the subsys_initcall(), leaving the ordering ambiguous.
If ghes_edac_register() is called first, then 'mc0' ends up at:
/sys/devices/mc0/, instead of the expected:
/sys/devices/system/edac/mc/mc0.
So while everything seems ok, other than the unexpected sysfs location, it
seems like 'edac_init()' should be called before any drivers start
registering. So have 'edac_init()' called earlier via arch_initcall().
However, this moves edac_pci_clear_parity_errors() up as well. Seems like
this wants to be called after pci bus scan, so keep
edac_pci_clear_parity_errors() at subsys_init(). That said, it seems like
pci bus scan happens at subsys_init() level, so really the parity clearing
should be moved later. But that can be left as a separate patch.
Fixes: dc4e8c07e9e2 ("ACPI: APEI: explicit init of HEST and GHES in apci_init()")
Signed-off-by: Jason Baron <jbaron@akamai.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robert Richter <rric@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: stable@vger.kernel.org
---
drivers/edac/edac_module.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
Comments
Hi Jason, I love your patch! Yet something to improve: [auto build test ERROR on ras/edac-for-next] [also build test ERROR on linus/master v6.1-rc5 next-20221115] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Jason-Baron/EDAC-edac_module-order-edac_init-before-ghes_edac_register/20221116-084046 base: https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac-for-next patch link: https://lore.kernel.org/r/20221116003729.194802-1-jbaron%40akamai.com patch subject: [PATCH] EDAC/edac_module: order edac_init() before ghes_edac_register() config: powerpc-allyesconfig compiler: powerpc-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/a970ee7e983345d07bd1f3e455688ef753f32a45 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Jason-Baron/EDAC-edac_module-order-edac_init-before-ghes_edac_register/20221116-084046 git checkout a970ee7e983345d07bd1f3e455688ef753f32a45 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): drivers/edac/edac_module.c: In function 'edac_init_clear_parity_errors': drivers/edac/edac_module.c:162:16: error: 'return' with a value, in function returning void [-Werror=return-type] 162 | return 0; | ^ drivers/edac/edac_module.c:151:20: note: declared here 151 | static void __init edac_init_clear_parity_errors(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/printk.h:6, from include/asm-generic/bug.h:22, from arch/powerpc/include/asm/bug.h:158, from include/linux/bug.h:5, from arch/powerpc/include/asm/cmpxchg.h:8, from arch/powerpc/include/asm/atomic.h:11, from include/linux/atomic.h:7, from include/linux/edac.h:15, from drivers/edac/edac_module.c:13: drivers/edac/edac_module.c: At top level: >> drivers/edac/edac_module.c:177:17: error: initialization of 'initcall_t' {aka 'int (*)(void)'} from incompatible pointer type 'void (*)(void)' [-Werror=incompatible-pointer-types] 177 | subsys_initcall(edac_init_clear_parity_errors); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/init.h:250:55: note: in definition of macro '____define_initcall' 250 | __attribute__((__section__(__sec))) = fn; | ^~ include/linux/init.h:260:9: note: in expansion of macro '__unique_initcall' 260 | __unique_initcall(fn, id, __sec, __initcall_id(fn)) | ^~~~~~~~~~~~~~~~~ include/linux/init.h:262:35: note: in expansion of macro '___define_initcall' 262 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id) | ^~~~~~~~~~~~~~~~~~ include/linux/init.h:286:41: note: in expansion of macro '__define_initcall' 286 | #define subsys_initcall(fn) __define_initcall(fn, 4) | ^~~~~~~~~~~~~~~~~ drivers/edac/edac_module.c:177:1: note: in expansion of macro 'subsys_initcall' 177 | subsys_initcall(edac_init_clear_parity_errors); | ^~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +177 drivers/edac/edac_module.c 173 174 /* 175 * Clear parity errors after PCI subsys is initialized 176 */ > 177 subsys_initcall(edac_init_clear_parity_errors); 178
On Tue, Nov 15, 2022 at 07:37:29PM -0500, Jason Baron wrote:
> Currently, ghes_edac_register() is called via ghes_init() from acpi_init()
https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git/log/?h=edac-ghes
Hi Jason, I love your patch! Yet something to improve: [auto build test ERROR on ras/edac-for-next] [also build test ERROR on linus/master v6.1-rc5 next-20221115] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Jason-Baron/EDAC-edac_module-order-edac_init-before-ghes_edac_register/20221116-084046 base: https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac-for-next patch link: https://lore.kernel.org/r/20221116003729.194802-1-jbaron%40akamai.com patch subject: [PATCH] EDAC/edac_module: order edac_init() before ghes_edac_register() config: powerpc-allmodconfig compiler: powerpc-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/a970ee7e983345d07bd1f3e455688ef753f32a45 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Jason-Baron/EDAC-edac_module-order-edac_init-before-ghes_edac_register/20221116-084046 git checkout a970ee7e983345d07bd1f3e455688ef753f32a45 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All error/warnings (new ones prefixed by >>): drivers/edac/edac_module.c: In function 'edac_init_clear_parity_errors': drivers/edac/edac_module.c:162:16: error: 'return' with a value, in function returning void [-Werror=return-type] 162 | return 0; | ^ drivers/edac/edac_module.c:151:20: note: declared here 151 | static void __init edac_init_clear_parity_errors(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/device/driver.h:21, from include/linux/device.h:32, from include/linux/edac.h:16, from drivers/edac/edac_module.c:13: drivers/edac/edac_module.c: At top level: include/linux/module.h:130:49: error: redefinition of '__inittest' 130 | static inline initcall_t __maybe_unused __inittest(void) \ | ^~~~~~~~~~ include/linux/module.h:116:41: note: in expansion of macro 'module_init' 116 | #define subsys_initcall(fn) module_init(fn) | ^~~~~~~~~~~ drivers/edac/edac_module.c:177:1: note: in expansion of macro 'subsys_initcall' 177 | subsys_initcall(edac_init_clear_parity_errors); | ^~~~~~~~~~~~~~~ include/linux/module.h:130:49: note: previous definition of '__inittest' with type 'int (*(void))(void)' 130 | static inline initcall_t __maybe_unused __inittest(void) \ | ^~~~~~~~~~ include/linux/module.h:115:41: note: in expansion of macro 'module_init' 115 | #define arch_initcall(fn) module_init(fn) | ^~~~~~~~~~~ drivers/edac/edac_module.c:171:1: note: in expansion of macro 'arch_initcall' 171 | arch_initcall(edac_init); | ^~~~~~~~~~~~~ drivers/edac/edac_module.c: In function '__inittest': >> drivers/edac/edac_module.c:177:17: error: returning 'void (*)(void)' from a function with incompatible return type 'initcall_t' {aka 'int (*)(void)'} [-Werror=incompatible-pointer-types] 177 | subsys_initcall(edac_init_clear_parity_errors); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/module.h:131:18: note: in definition of macro 'module_init' 131 | { return initfn; } \ | ^~~~~~ drivers/edac/edac_module.c:177:1: note: in expansion of macro 'subsys_initcall' 177 | subsys_initcall(edac_init_clear_parity_errors); | ^~~~~~~~~~~~~~~ drivers/edac/edac_module.c: At top level: include/linux/module.h:132:13: error: redefinition of 'init_module' 132 | int init_module(void) __copy(initfn) \ | ^~~~~~~~~~~ include/linux/module.h:116:41: note: in expansion of macro 'module_init' 116 | #define subsys_initcall(fn) module_init(fn) | ^~~~~~~~~~~ drivers/edac/edac_module.c:177:1: note: in expansion of macro 'subsys_initcall' 177 | subsys_initcall(edac_init_clear_parity_errors); | ^~~~~~~~~~~~~~~ include/linux/module.h:132:13: note: previous definition of 'init_module' with type 'int(void)' 132 | int init_module(void) __copy(initfn) \ | ^~~~~~~~~~~ include/linux/module.h:115:41: note: in expansion of macro 'module_init' 115 | #define arch_initcall(fn) module_init(fn) | ^~~~~~~~~~~ drivers/edac/edac_module.c:171:1: note: in expansion of macro 'arch_initcall' 171 | arch_initcall(edac_init); | ^~~~~~~~~~~~~ >> include/linux/module.h:132:13: warning: 'init_module' alias between functions of incompatible types 'int(void)' and 'void(void)' [-Wattribute-alias=] 132 | int init_module(void) __copy(initfn) \ | ^~~~~~~~~~~ include/linux/module.h:116:41: note: in expansion of macro 'module_init' 116 | #define subsys_initcall(fn) module_init(fn) | ^~~~~~~~~~~ drivers/edac/edac_module.c:177:1: note: in expansion of macro 'subsys_initcall' 177 | subsys_initcall(edac_init_clear_parity_errors); | ^~~~~~~~~~~~~~~ drivers/edac/edac_module.c:151:20: note: aliased declaration here 151 | static void __init edac_init_clear_parity_errors(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +177 drivers/edac/edac_module.c 173 174 /* 175 * Clear parity errors after PCI subsys is initialized 176 */ > 177 subsys_initcall(edac_init_clear_parity_errors); 178
On 11/16/22 06:14, Borislav Petkov wrote: > On Tue, Nov 15, 2022 at 07:37:29PM -0500, Jason Baron wrote: >> Currently, ghes_edac_register() is called via ghes_init() from acpi_init() > https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git/log/?h=edac-ghes__;!!GjvTz_vk!RVsGvU3qNqFLwWDFImJScVgizbxofNbNY-8NF2inDqKTrn3IWJdJdcQJ6FoKxFkWhEPRpYmwzw$ > Hi Boris, Thanks, yes this looks like it will address the regression. Is this planned for 6.1? Or 5.15 stable, which is where we hit this regression? Thanks, -Jason
Hi, On Wed, Nov 16, 2022 at 09:32:41AM -0500, Jason Baron wrote: > Thanks, yes this looks like it will address the regression. Is this > planned for 6.1? 6.2. > Or 5.15 stable, which is where we hit this regression? No, I don't think it is stable material. Thx.
On 11/16/22 13:37, Borislav Petkov wrote: > Hi, > > On Wed, Nov 16, 2022 at 09:32:41AM -0500, Jason Baron wrote: >> Thanks, yes this looks like it will address the regression. Is this >> planned for 6.1? > 6.2. > >> Or 5.15 stable, which is where we hit this regression? > No, I don't think it is stable material. > > Thx. > Ok, thanks. Is there any plan to address this in 5.15 stable/6.1 ? Either with a revert or fixup as I proposed or something else? Thanks, -Jason
diff --git a/drivers/edac/edac_module.c b/drivers/edac/edac_module.c index 32a931d0cb71..407d4a5fce7a 100644 --- a/drivers/edac/edac_module.c +++ b/drivers/edac/edac_module.c @@ -109,15 +109,6 @@ static int __init edac_init(void) if (err) return err; - /* - * Harvest and clear any boot/initialization PCI parity errors - * - * FIXME: This only clears errors logged by devices present at time of - * module initialization. We should also do an initial clear - * of each newly hotplugged device. - */ - edac_pci_clear_parity_errors(); - err = edac_mc_sysfs_init(); if (err) goto err_sysfs; @@ -157,12 +148,34 @@ static void __exit edac_exit(void) edac_subsys_exit(); } +static void __init edac_init_clear_parity_errors(void) +{ + /* + * Harvest and clear any boot/initialization PCI parity errors + * + * FIXME: This only clears errors logged by devices present at time of + * module initialization. We should also do an initial clear + * of each newly hotplugged device. + */ + edac_pci_clear_parity_errors(); + + return 0; +} + /* * Inform the kernel of our entry and exit points + * + * ghes_edac_register() is call via acpi_init() -> ghes_init() + * at the subsys_initcall level so edac_init() must come first */ -subsys_initcall(edac_init); +arch_initcall(edac_init); module_exit(edac_exit); +/* + * Clear parity errors after PCI subsys is initialized + */ +subsys_initcall(edac_init_clear_parity_errors); + MODULE_LICENSE("GPL"); MODULE_AUTHOR("Doug Thompson www.softwarebitmaker.com, et al"); MODULE_DESCRIPTION("Core library routines for EDAC reporting");