sched clock: clean up sched_clock_cpu()
authorIngo Molnar <mingo@elte.hu>
Wed, 30 Jul 2008 07:39:48 +0000 (09:39 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 31 Jul 2008 15:20:42 +0000 (17:20 +0200)
- simplify the remote clock rebasing

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Mike Galbraith <efault@gmx.de>
kernel/sched_clock.c

index 9a78441..b96559c 100644 (file)
@@ -169,11 +169,8 @@ u64 sched_clock_cpu(int cpu)
 
                lock_double_clock(scd, my_scd);
 
-               now -= my_scd->tick_raw;
-               now += scd->tick_raw;
-
-               now += my_scd->tick_gtod;
-               now -= scd->tick_gtod;
+               now += scd->tick_raw - my_scd->tick_raw;
+               now += my_scd->tick_gtod - scd->tick_gtod;
 
                __raw_spin_unlock(&my_scd->lock);
        } else {