From: Ingo Molnar Date: Thu, 4 Sep 2008 20:47:47 +0000 (+0200) Subject: x86: quick TSC calibration, improve X-Git-Tag: v2.6.28-rc1~734^2^19~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4156e9a8ef5b521185f451213d33fa661f38512e;p=linux-2.6-omap-h63xx.git x86: quick TSC calibration, improve - make sure the final TSC timestamp is reliable too Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 839070ba846..6dab90f6851 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -316,6 +316,12 @@ static unsigned long quick_pit_calibrate(void) } t2 = get_cycles(); + /* + * Make sure we can rely on the second TSC timestamp: + */ + if (!pit_expect_msb(--expect)) + goto failed; + /* * Ok, if we get here, then we've seen the * MSB of the PIT decrement QUICK_PIT_ITERATIONS