]> git.baikalelectronics.ru Git - kernel.git/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)
commit1d2d6aaaeb6e331a9395c9004c7f5f0d23a54750
tree2d5dd9da1abdeb2678693c88a3c05fd80c0a2e0e
parent0d727db216fd7bded867131521a6f12836a3ad13
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