diff options
author | Yazen Ghannam <Yazen.Ghannam@amd.com> | 2017-01-27 11:24:23 -0600 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2017-01-28 14:43:06 +0100 |
commit | 1bd9900b8301fc505f032c90ea487824cf824e99 (patch) | |
tree | cd96515d589f7ac639264ad40a3837320ae41bd9 /drivers/edac/amd64_edac.h | |
parent | 4688c9b42dd2040673a1c2208a1008822b07ee4a (diff) | |
download | linux-stable-1bd9900b8301fc505f032c90ea487824cf824e99.tar.gz linux-stable-1bd9900b8301fc505f032c90ea487824cf824e99.tar.bz2 linux-stable-1bd9900b8301fc505f032c90ea487824cf824e99.zip |
EDAC, amd64: Add x86cpuid sanity check during init
Match one of the devices in amd64_cpuids[] before loading the module.
This is an additional sanity check against users trying to load
amd64_edac_mod on unsupported systems.
Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1485537863-2707-9-git-send-email-Yazen.Ghannam@amd.com
[ Get rid of err_ret label, make it a bit more readable this way. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/amd64_edac.h')
-rw-r--r-- | drivers/edac/amd64_edac.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h index 469506fcc0fc..6acbfd3e0158 100644 --- a/drivers/edac/amd64_edac.h +++ b/drivers/edac/amd64_edac.h @@ -16,6 +16,7 @@ #include <linux/slab.h> #include <linux/mmzone.h> #include <linux/edac.h> +#include <asm/cpu_device_id.h> #include <asm/msr.h> #include "edac_module.h" #include "mce_amd.h" |