Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1424668

[PATCH 02/10] x86 tsc_msr: Identify Intel-specific code

From Len Brown <lenb@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 02/10] x86 tsc_msr: Identify Intel-specific code
Date 2016-06-17 07:30 +0200
Message-ID <rKUvT-2ml-13@gated-at.bofh.it> (permalink)
References <rKUvT-2ml-3@gated-at.bofh.it>
Organization Intel Open Source Technology Center

Show all headers | View raw


From: Len Brown <len.brown@intel.com>

try_msr_calibrate_tsc() is currently Intel-specific,
and should not execute on any other vendor's parts.

Signed-off-by: Len Brown <len.brown@intel.com>
---
 arch/x86/kernel/tsc_msr.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kernel/tsc_msr.c b/arch/x86/kernel/tsc_msr.c
index 6aa0f4d..4ec5e56 100644
--- a/arch/x86/kernel/tsc_msr.c
+++ b/arch/x86/kernel/tsc_msr.c
@@ -86,6 +86,9 @@ unsigned long try_msr_calibrate_tsc(void)
 	unsigned long res;
 	int cpu_index;
 
+	if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
+		return 0;
+
 	cpu_index = match_cpu(boot_cpu_data.x86, boot_cpu_data.x86_model);
 	if (cpu_index < 0)
 		return 0;
-- 
2.9.0

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 02/10] x86 tsc_msr: Identify Intel-specific code Len Brown <lenb@kernel.org> - 2016-06-17 07:30 +0200

csiph-web