]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - kernel/sched_clock.c
sched_clock: Fix atomicity/continuity bug by using cmpxchg64()
[linux-2.6.git] / kernel / sched_clock.c
index ac2e1dc708bdfb4f090aa1b6a743861bc5941c21..479ce5682d7c41c858557086de9113b0d71fa00c 100644 (file)
@@ -127,7 +127,7 @@ again:
        clock = wrap_max(clock, min_clock);
        clock = wrap_min(clock, max_clock);
 
-       if (cmpxchg(&scd->clock, old_clock, clock) != old_clock)
+       if (cmpxchg64(&scd->clock, old_clock, clock) != old_clock)
                goto again;
 
        return clock;
@@ -163,7 +163,7 @@ again:
                val = remote_clock;
        }
 
-       if (cmpxchg(ptr, old_val, val) != old_val)
+       if (cmpxchg64(ptr, old_val, val) != old_val)
                goto again;
 
        return val;