diff options
author | Bryan O'Donoghue <pure.logic@nexus-software.ie> | 2015-03-31 07:15:36 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-04-02 06:47:50 -0400 |
commit | a6fcb6d4804b51ffcae7881c7f99483f4981ddf1 (patch) | |
tree | ef25e75d86870eb538cf5329fc43f7bb6adee2f9 | |
parent | e42391cd048809d903291d07f86ed3934ce138e9 (diff) |
x86/intel/quark: Run IMR self-test on IMR capble hw only
Automated testing with LKP shows IMR self test code running and
printing error messages on QEMU hardware lacking IMR support.
Update IMR self-test code to run only when IMR hardware should
be present. Tested on Quark X1000 and QEMU.
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Acked-by: Ong Boon Leong <boon.leong.ong@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: andriy.shevchenko@intel.com
Cc: dvhart@linux.intel.com
Cc: huang.ying.caritas@gmail.com
Cc: ying.huang@intel.com
Link: http://lkml.kernel.org/r/1427800536-32339-1-git-send-email-pure.logic@nexus-software.ie
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/platform/intel-quark/imr_selftest.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/platform/intel-quark/imr_selftest.c b/arch/x86/platform/intel-quark/imr_selftest.c index c9a0838890e2..278e4da4222f 100644 --- a/arch/x86/platform/intel-quark/imr_selftest.c +++ b/arch/x86/platform/intel-quark/imr_selftest.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <asm-generic/sections.h> | 13 | #include <asm-generic/sections.h> |
14 | #include <asm/cpu_device_id.h> | ||
14 | #include <asm/imr.h> | 15 | #include <asm/imr.h> |
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
16 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
@@ -101,6 +102,12 @@ static void __init imr_self_test(void) | |||
101 | } | 102 | } |
102 | } | 103 | } |
103 | 104 | ||
105 | static const struct x86_cpu_id imr_ids[] __initconst = { | ||
106 | { X86_VENDOR_INTEL, 5, 9 }, /* Intel Quark SoC X1000. */ | ||
107 | {} | ||
108 | }; | ||
109 | MODULE_DEVICE_TABLE(x86cpu, imr_ids); | ||
110 | |||
104 | /** | 111 | /** |
105 | * imr_self_test_init - entry point for IMR driver. | 112 | * imr_self_test_init - entry point for IMR driver. |
106 | * | 113 | * |
@@ -108,7 +115,8 @@ static void __init imr_self_test(void) | |||
108 | */ | 115 | */ |
109 | static int __init imr_self_test_init(void) | 116 | static int __init imr_self_test_init(void) |
110 | { | 117 | { |
111 | imr_self_test(); | 118 | if (x86_match_cpu(imr_ids)) |
119 | imr_self_test(); | ||
112 | return 0; | 120 | return 0; |
113 | } | 121 | } |
114 | 122 | ||