From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753426AbbDBMeo (ORCPT ); Thu, 2 Apr 2015 08:34:44 -0400 Received: from terminus.zytor.com ([198.137.202.10]:60824 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753180AbbDBMek (ORCPT ); Thu, 2 Apr 2015 08:34:40 -0400 Date: Thu, 2 Apr 2015 05:34:11 -0700 From: "tip-bot for Bryan O'Donoghue" Message-ID: Cc: pure.logic@nexus-software.ie, mingo@kernel.org, bp@alien8.de, linux-kernel@vger.kernel.org, boon.leong.ong@intel.com, hpa@zytor.com, tglx@linutronix.de Reply-To: mingo@kernel.org, pure.logic@nexus-software.ie, bp@alien8.de, linux-kernel@vger.kernel.org, boon.leong.ong@intel.com, tglx@linutronix.de, hpa@zytor.com In-Reply-To: <1427800536-32339-1-git-send-email-pure.logic@nexus-software.ie> References: <1427800536-32339-1-git-send-email-pure.logic@nexus-software.ie> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/platform] x86/intel/quark: Run IMR self-test on IMR capble hw only Git-Commit-ID: a6fcb6d4804b51ffcae7881c7f99483f4981ddf1 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: a6fcb6d4804b51ffcae7881c7f99483f4981ddf1 Gitweb: http://git.kernel.org/tip/a6fcb6d4804b51ffcae7881c7f99483f4981ddf1 Author: Bryan O'Donoghue AuthorDate: Tue, 31 Mar 2015 12:15:36 +0100 Committer: Ingo Molnar 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 Acked-by: Ong Boon Leong Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Thomas Gleixner 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 --- 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 +#include #include #include #include @@ -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; }