summaryrefslogtreecommitdiffstats
path: root/drivers/edac/xgene_edac.c
diff options
context:
space:
mode:
authorJia He <justin.he@arm.com>2022-10-10 04:35:57 +0200
committerBorislav Petkov <bp@suse.de>2022-10-21 22:09:54 +0200
commit315bada690e0c4a5c268a1dd3601aefd3355773f (patch)
tree944ab33e07d51e69893ee76f73fa095b49f9b207 /drivers/edac/xgene_edac.c
parentEDAC/ghes: Make ghes_edac a proper module (diff)
downloadlinux-315bada690e0c4a5c268a1dd3601aefd3355773f.tar.xz
linux-315bada690e0c4a5c268a1dd3601aefd3355773f.zip
EDAC: Check for GHES preference in the chipset-specific EDAC drivers
Call ghes_get_devices() to check whether ghes_edac should be used on the platform where it is preferred over the corresponding chipset-specific EDAC driver. Unlike the existing edac_get_owner() check, the ghes_get_devices() check works independent to the module_init ordering. [ bp: Massage. ] Suggested-by: Toshi Kani <toshi.kani@hpe.com> Signed-off-by: Jia He <justin.he@arm.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20221010023559.69655-6-justin.he@arm.com
Diffstat (limited to 'drivers/edac/xgene_edac.c')
-rw-r--r--drivers/edac/xgene_edac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
index 54081403db4f..c52b9dd9154c 100644
--- a/drivers/edac/xgene_edac.c
+++ b/drivers/edac/xgene_edac.c
@@ -2004,6 +2004,9 @@ static int __init xgene_edac_init(void)
{
int rc;
+ if (ghes_get_devices())
+ return -EBUSY;
+
/* Make sure error reporting method is sane */
switch (edac_op_state) {
case EDAC_OPSTATE_POLL: