]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/tsc.c
Fix potential fast PIT TSC calibration startup glitch
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / tsc.c
index 599e58168631e22e5ff69e15c365273bd2f9b03c..9e80207c96a287dc944913e30e1ba074772a04a4 100644 (file)
@@ -315,6 +315,15 @@ static unsigned long quick_pit_calibrate(void)
        outb(0xff, 0x42);
        outb(0xff, 0x42);
 
+       /*
+        * The PIT starts counting at the next edge, so we
+        * need to delay for a microsecond. The easiest way
+        * to do that is to just read back the 16-bit counter
+        * once from the PIT.
+        */
+       inb(0x42);
+       inb(0x42);
+
        if (pit_expect_msb(0xff)) {
                int i;
                u64 t1, t2, delta;