]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
EDAC, ghes: Make platform-based whitelisting x86-only
authorBorislav Petkov <bp@suse.de>
Fri, 18 May 2018 11:13:31 +0000 (13:13 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 21 May 2018 10:18:57 +0000 (12:18 +0200)
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.

Reported-by: Qiang Zheng <zhengqiang10@huawei.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: James Morse <james.morse@arm.com>
Tested-by: James Morse <james.morse@arm.com>
Tested-by: Qiang Zheng <zhengqiang10@huawei.com>
Link: https://lkml.kernel.org/r/1526039543-180996-1-git-send-email-zhengqiang10@huawei.com
drivers/edac/ghes_edac.c

index 863fbf3db29fe411d5ad7628f769cf56b8cc9d0d..473aeec4b1da44ec4c069d1225db85c67ea691a8 100644 (file)
@@ -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.