LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] x86/quark: Run IMR self-test on IMR capble hw only
@ 2015-03-31 11:15 Bryan O'Donoghue
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Bryan O'Donoghue @ 2015-03-31 11:15 UTC (permalink / raw)
  To: pure.logic, mingo, tglx, hpa, x86, ying.huang,
	huang.ying.caritas, andriy.shevchenko, boon.leong.ong, dvhart,
	linux-kernel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] x86/quark: Run IMR self-test on IMR capble hw only
  2015-03-31 11:15 [PATCH] x86/quark: Run IMR self-test on IMR capble hw only Bryan O'Donoghue
@ 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
  1 sibling, 0 replies; 3+ messages in thread
From: Ong, Boon Leong @ 2015-03-31 12:14 UTC (permalink / raw)
  To: Bryan O'Donoghue, mingo, tglx, hpa, x86, Huang, Ying,
	huang.ying.caritas, Shevchenko, Andriy, dvhart, linux-kernel

Looks good to me. Thanks

>-----Original Message-----
>From: Bryan O'Donoghue [mailto:pure.logic@nexus-software.ie]
>Sent: Tuesday, March 31, 2015 7:16 PM
>To: pure.logic@nexus-software.ie; mingo@redhat.com; tglx@linutronix.de;
>hpa@zytor.com; x86@kernel.org; Huang, Ying; huang.ying.caritas@gmail.com;
>Shevchenko, Andriy; Ong, Boon Leong; dvhart@linux.intel.com; linux-
>kernel@vger.kernel.org
>Subject: [PATCH] x86/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>

>---
> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:x86/platform] x86/intel/quark: Run IMR self-test on IMR capble hw only
  2015-03-31 11:15 [PATCH] x86/quark: Run IMR self-test on IMR capble hw only Bryan O'Donoghue
  2015-03-31 12:14 ` Ong, Boon Leong
@ 2015-04-02 12:34 ` tip-bot for Bryan O'Donoghue
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Bryan O'Donoghue @ 2015-04-02 12:34 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: pure.logic, mingo, bp, linux-kernel, boon.leong.ong, hpa, tglx

Commit-ID:  a6fcb6d4804b51ffcae7881c7f99483f4981ddf1
Gitweb:     http://git.kernel.org/tip/a6fcb6d4804b51ffcae7881c7f99483f4981ddf1
Author:     Bryan O'Donoghue <pure.logic@nexus-software.ie>
AuthorDate: Tue, 31 Mar 2015 12:15:36 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 2 Apr 2015 12:47:50 +0200

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>
---
 arch/x86/platform/intel-quark/imr_selftest.c | 10 +++++++++-
 1 file changed, 9 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..278e4da 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,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,7 +115,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;
 }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-02 12:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-31 11:15 [PATCH] x86/quark: Run IMR self-test on IMR capble hw only Bryan O'Donoghue
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).