x86/tsc: Enumerate SKL cpu_khz and tsc_khz via CPUID
authorLen Brown <len.brown@intel.com>
Fri, 17 Jun 2016 05:22:51 +0000 (01:22 -0400)
committerIngo Molnar <mingo@kernel.org>
Mon, 11 Jul 2016 19:30:13 +0000 (21:30 +0200)
commitaa297292d708e89773b3b2cdcaf33f01bfa095d8
tree2930daf94d5bba00f8766f2ffcdaf6ba0c8d16ea
parent02c0cd2dcf7fdc47d054b855b148ea8b82dbb7eb
x86/tsc: Enumerate SKL cpu_khz and tsc_khz via CPUID

Skylake CPU base-frequency and TSC frequency may differ
by up to 2%.

Enumerate CPU and TSC frequencies separately, allowing
cpu_khz and tsc_khz to differ.

The existing CPU frequency calibration mechanism is unchanged.
However, CPUID extensions are preferred, when available.

CPUID.0x16 is preferred over MSR and timer calibration
for CPU frequency discovery.

CPUID.0x15 takes precedence over CPU-frequency
for TSC frequency discovery.

Signed-off-by: Len Brown <len.brown@intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/b27ec289fd005833b27d694d9c2dbb716c5cdff7.1466138954.git.len.brown@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/tsc.h
arch/x86/include/asm/x86_init.h
arch/x86/kernel/tsc.c
arch/x86/kernel/x86_init.c