]> err.no Git - linux-2.6/commit
x86: fix more TSC clock source calibration errors
authorDave Johnson <djohnson@sw.starentnetworks.com>
Tue, 23 Oct 2007 20:37:22 +0000 (22:37 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 23 Oct 2007 20:37:22 +0000 (22:37 +0200)
commit8c660065383976f09fbdae86c33448c8da643d4e
tree2d5dd9da1abdeb2678693c88a3c05fd80c0a2e0e
parentedaf420fdc122e7a42326fe39274c8b8c9b19d41
x86: fix more TSC clock source calibration errors

The previous patch wasn't correctly handling the 'count' variable.  If
a CPU gave bad results on the 1st or 2nd run but good results on the
3rd, it wouldn't do the correct thing.  No idea if any such CPU
exists, but the patch below handles that case by discarding the bad
runs.

If a bad result (too quick, or too slow) occurs on any of the 3 runs
it will be discarded.

Also updated some comments to explain what's going on.

Signed-off-by: Dave Johnson <djohnson@sw.starentnetworks.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/tsc_32.c