OSDN Git Service

x86/tsc: Let high latency PIT fail fast in quick_pit_calibrate()
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 3 Jun 2015 07:39:46 +0000 (10:39 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 6 Jul 2015 07:41:00 +0000 (09:41 +0200)
commit5aac644a9944bea93b4f05ced1883a902a2535f6
tree4e6e013b1d10f267d646b05ae84ec795f426e323
parentd770e558e21961ad6cfdf0ff7df0eb5d7d4f0754
x86/tsc: Let high latency PIT fail fast in quick_pit_calibrate()

If it takes longer than 12us to read the PIT counter lsb/msb,
then the error margin will never fall below 500ppm within 50ms,
and Fast TSC calibration will always fail.

This patch detects when that will happen and fails fast. Note
the failure message is not printed in that case because:
1. it will always happen on that class of hardware
2. the absence of the message is more informative than its
presence

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/556EB717.9070607@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/tsc.c