[PATCH 3/4] x86/tsc: mark Intel ATOM_GOLDMONT TSC reliable

From: Bin Gao
Date: Tue Nov 15 2016 - 15:21:58 EST


On Intel GOLDMONT Atom SoC TSC is the only reliable clocksource.
We mark TSC reliable to avoid watchdog on it.

Signed-off-by: Bin Gao <bin.gao@xxxxxxxxx>
---
arch/x86/kernel/tsc.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index f1a7fb5..354b302 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -709,6 +709,13 @@ unsigned long native_calibrate_tsc(void)
*/
setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);

+ /*
+ * For Atom SoCs TSC is the only reliable clocksource.
+ * Mark TSC reliable so no watchdog on it.
+ */
+ if (boot_cpu_data.x86_model == INTEL_FAM6_ATOM_GOLDMONT)
+ setup_force_cpu_cap(X86_FEATURE_TSC_RELIABLE);
+
return crystal_khz * ebx_numerator / eax_denominator;
}

--
1.9.1