Skip to content

Commit ee799f4

Browse files
committed
Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 platform change from Ingo Molnar: "An Intel Quark SoC fix" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/intel/quark: Run IMR self-test on IMR capble hw only
2 parents 6cf78d4 + a6fcb6d commit ee799f4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

arch/x86/platform/intel-quark/imr_selftest.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include <asm-generic/sections.h>
14+
#include <asm/cpu_device_id.h>
1415
#include <asm/imr.h>
1516
#include <linux/init.h>
1617
#include <linux/mm.h>
@@ -101,14 +102,21 @@ static void __init imr_self_test(void)
101102
}
102103
}
103104

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+
104111
/**
105112
* imr_self_test_init - entry point for IMR driver.
106113
*
107114
* return: -ENODEV for no IMR support 0 if good to go.
108115
*/
109116
static int __init imr_self_test_init(void)
110117
{
111-
imr_self_test();
118+
if (x86_match_cpu(imr_ids))
119+
imr_self_test();
112120
return 0;
113121
}
114122

0 commit comments

Comments
 (0)