]> git.baikalelectronics.ru Git - kernel.git/commit
x86, tsc: Add static (MSR) TSC calibration on Intel Atom SoCs
authorBin Gao <bin.gao@intel.com>
Mon, 21 Oct 2013 16:16:33 +0000 (09:16 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 16 Jan 2014 06:28:48 +0000 (22:28 -0800)
commit4945b32c92c15a21ea8328971c212c9933d99635
treefbe28621d7961051588dc86f86a90dfe4ecd906f
parent67433fb1fb672c576c88b89160f1da2b3f76133d
x86, tsc: Add static (MSR) TSC calibration on Intel Atom SoCs

On SoCs that have the calibration MSRs available, either there is no
PIT, HPET or PMTIMER to calibrate against, or the PIT/HPET/PMTIMER is
driven from the same clock as the TSC, so calibration is redundant and
just slows down the boot.

TSC rate is caculated by this formula:
<maximum core-clock to bus-clock ratio> * <maximum resolved frequency>
The ratio and the resolved frequency ID can be obtained from MSR.
See Intel 64 and IA-32 System Programming Guid section 16.12 and 30.11.5
for details.

Signed-off-by: Bin Gao <bin.gao@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/n/tip-rgm7xmg7k6qnjlw3ynkcjsmh@git.kernel.org
arch/x86/include/asm/tsc.h
arch/x86/kernel/Makefile
arch/x86/kernel/tsc.c
arch/x86/kernel/tsc_msr.c [new file with mode: 0644]