x86: quick TSC calibration, improve

- make sure the final TSC timestamp is reliable too

Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Ingo Molnar 2008-09-04 22:47:47 +02:00
Родитель 6ac40ed041
Коммит 4156e9a8ef
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -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