summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2440/s3c2442.c
diff options
context:
space:
mode:
authorJohn Stultz <johnstul@us.ibm.com>2010-07-27 17:00:00 -0700
committerJohn Stultz <john.stultz@linaro.org>2010-12-02 16:48:37 -0800
commit08ec0c58fb8a05d3191d5cb6f5d6f81adb419798 (patch)
tree9dd292575c8b349300ba837a8103cbd9235a5b4f /arch/arm/mach-s3c2440/s3c2442.c
parentb0f969009f647cd473c5e559aeec9c4229d12f87 (diff)
downloadblackbird-obmc-linux-08ec0c58fb8a05d3191d5cb6f5d6f81adb419798.tar.gz
blackbird-obmc-linux-08ec0c58fb8a05d3191d5cb6f5d6f81adb419798.zip
x86: Improve TSC calibration using a delayed workqueue
Boot to boot the TSC calibration may vary by quite a large amount. While normal variance of 50-100ppm can easily be seen, the quick calibration code only requires 500ppm accuracy, which is the limit of what NTP can correct for. This can cause problems for systems being used as NTP servers, as every time they reboot it can take hours for them to calculate the new drift error caused by the calibration. The classic trade-off here is calibration accuracy vs slow boot times, as during the calibration nothing else can run. This patch uses a delayed workqueue to calibrate the TSC over the period of a second. This allows very accurate calibration (in my tests only varying by 1khz or 0.4ppm boot to boot). Additionally this refined calibration step does not block the boot process, and only delays the TSC clocksoure registration by a few seconds in early boot. If the refined calibration strays 1% from the early boot calibration value, the system will fall back to already calculated early boot calibration. Credit to Andi Kleen who suggested using a timer quite awhile back, but I dismissed it thinking the timer calibration would be done after the clocksource was registered (which would break things). Forgive me for my short-sightedness. This patch has worked very well in my testing, but TSC hardware is quite varied so it would probably be good to get some extended testing, possibly pushing inclusion out to 2.6.39. Signed-off-by: John Stultz <johnstul@us.ibm.com> LKML-Reference: <1289003985-29060-1-git-send-email-johnstul@us.ibm.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> CC: Thomas Gleixner <tglx@linutronix.de> CC: Ingo Molnar <mingo@elte.hu> CC: Martin Schwidefsky <schwidefsky@de.ibm.com> CC: Clark Williams <williams@redhat.com> CC: Andi Kleen <andi@firstfloor.org>
Diffstat (limited to 'arch/arm/mach-s3c2440/s3c2442.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud