Commit 4156e9a8 authored by Ingo Molnar's avatar Ingo Molnar

x86: quick TSC calibration, improve

- make sure the final TSC timestamp is reliable too
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 6ac40ed0
...@@ -316,6 +316,12 @@ static unsigned long quick_pit_calibrate(void) ...@@ -316,6 +316,12 @@ static unsigned long quick_pit_calibrate(void)
} }
t2 = get_cycles(); 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 * Ok, if we get here, then we've seen the
* MSB of the PIT decrement QUICK_PIT_ITERATIONS * MSB of the PIT decrement QUICK_PIT_ITERATIONS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment