From: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
To: pure.logic@nexus-software.ie, mingo@redhat.com,
tglx@linutronix.de, hpa@zytor.com, x86@kernel.org,
ying.huang@intel.com, huang.ying.caritas@gmail.com,
andriy.shevchenko@intel.com, boon.leong.ong@intel.com,
dvhart@linux.intel.com, linux-kernel@vger.kernel.org
Subject: [PATCH] x86/quark: Run IMR self-test on IMR capble hw only
Date: Tue, 31 Mar 2015 12:15:36 +0100 [thread overview]
Message-ID: <1427800536-32339-1-git-send-email-pure.logic@nexus-software.ie> (raw)
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>
---
arch/x86/platform/intel-quark/imr_selftest.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/x86/platform/intel-quark/imr_selftest.c b/arch/x86/platform/intel-quark/imr_selftest.c
index c9a0838..5e6c055 100644
--- a/arch/x86/platform/intel-quark/imr_selftest.c
+++ b/arch/x86/platform/intel-quark/imr_selftest.c
@@ -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,13 @@ 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,7 +116,8 @@ static void __init imr_self_test(void)
*/
static int __init imr_self_test_init(void)
{
- imr_self_test();
+ if (x86_match_cpu(imr_ids))
+ imr_self_test();
return 0;
}
--
1.9.1
next reply other threads:[~2015-03-31 11:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-31 11:15 Bryan O'Donoghue [this message]
2015-03-31 12:14 ` Ong, Boon Leong
2015-04-02 12:34 ` [tip:x86/platform] x86/intel/quark: " tip-bot for Bryan O'Donoghue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427800536-32339-1-git-send-email-pure.logic@nexus-software.ie \
--to=pure.logic@nexus-software.ie \
--cc=andriy.shevchenko@intel.com \
--cc=boon.leong.ong@intel.com \
--cc=dvhart@linux.intel.com \
--cc=hpa@zytor.com \
--cc=huang.ying.caritas@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®