Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6fcb6d4 authored by Bryan O'Donoghue's avatar Bryan O'Donoghue Committed by Ingo Molnar
Browse files

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: default avatarBryan O'Donoghue <pure.logic@nexus-software.ie>
Acked-by: default avatarOng 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: default avatarIngo Molnar <mingo@kernel.org>
parent e42391cd
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
 */

#include <asm-generic/sections.h>
#include <asm/cpu_device_id.h>
#include <asm/imr.h>
#include <linux/init.h>
#include <linux/mm.h>
@@ -101,6 +102,12 @@ static void __init imr_self_test(void)
	}
}

static const struct x86_cpu_id imr_ids[] __initconst = {
	{ X86_VENDOR_INTEL, 5, 9 },	/* Intel Quark SoC X1000. */
	{}
};
MODULE_DEVICE_TABLE(x86cpu, imr_ids);

/**
 * imr_self_test_init - entry point for IMR driver.
 *
@@ -108,6 +115,7 @@ static void __init imr_self_test(void)
 */
static int __init imr_self_test_init(void)
{
	if (x86_match_cpu(imr_ids))
		imr_self_test();
	return 0;
}