]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/tsc_sync.c
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6] / arch / x86 / kernel / tsc_sync.c
index 05d8f25de6ae41dcde81a48cc0c7015fe3fe3743..9ffb01c31c40a8c9083e9949d065a442a62f46b7 100644 (file)
@@ -46,7 +46,7 @@ static __cpuinit void check_tsc_warp(void)
        cycles_t start, now, prev, end;
        int i;
 
-       start = get_cycles_sync();
+       start = get_cycles();
        /*
         * The measurement runs for 20 msecs:
         */
@@ -61,18 +61,18 @@ static __cpuinit void check_tsc_warp(void)
                 */
                __raw_spin_lock(&sync_lock);
                prev = last_tsc;
-               now = get_cycles_sync();
+               now = get_cycles();
                last_tsc = now;
                __raw_spin_unlock(&sync_lock);
 
                /*
                 * Be nice every now and then (and also check whether
-                * measurement is done [we also insert a 100 million
+                * measurement is done [we also insert a 10 million
                 * loops safety exit, so we dont lock up in case the
                 * TSC readout is totally broken]):
                 */
                if (unlikely(!(i & 7))) {
-                       if (now > end || i > 100000000)
+                       if (now > end || i > 10000000)
                                break;
                        cpu_relax();
                        touch_nmi_watchdog();
@@ -87,8 +87,10 @@ static __cpuinit void check_tsc_warp(void)
                        nr_warps++;
                        __raw_spin_unlock(&sync_lock);
                }
-
        }
+       WARN(!(now-start),
+               "Warning: zero tsc calibration delta: %Ld [max: %Ld]\n",
+                       now-start, end-start);
 }
 
 /*