From 315bada690e0c4a5c268a1dd3601aefd3355773f Mon Sep 17 00:00:00 2001 From: Jia He Date: Mon, 10 Oct 2022 02:35:57 +0000 Subject: 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 Signed-off-by: Jia He Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221010023559.69655-6-justin.he@arm.com --- drivers/edac/pnd2_edac.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/edac/pnd2_edac.c') diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c index a20b299f1202..2b306f2cc605 100644 --- a/drivers/edac/pnd2_edac.c +++ b/drivers/edac/pnd2_edac.c @@ -1528,6 +1528,9 @@ static int __init pnd2_init(void) edac_dbg(2, "\n"); + if (ghes_get_devices()) + return -EBUSY; + owner = edac_get_owner(); if (owner && strncmp(owner, EDAC_MOD_STR, sizeof(EDAC_MOD_STR))) return -EBUSY; -- cgit