summaryrefslogtreecommitdiffstats
path: root/kernel/sched_clock.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-30 09:39:48 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-31 17:20:42 +0200
commit50526968e99afbca34924abcb04658b6dd5c5ea5 (patch)
tree694bf4fae96efb10261e9a30514adf052d994360 /kernel/sched_clock.c
parente4e4e534faa3c2be4e165ce414f44b76ada7208c (diff)
downloadlinux-50526968e99afbca34924abcb04658b6dd5c5ea5.tar.gz
linux-50526968e99afbca34924abcb04658b6dd5c5ea5.tar.bz2
linux-50526968e99afbca34924abcb04658b6dd5c5ea5.zip
sched clock: clean up sched_clock_cpu()
- 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>
Diffstat (limited to 'kernel/sched_clock.c')
-rw-r--r--kernel/sched_clock.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c
index 9a7844158ae8..b96559cb96a5 100644
--- a/kernel/sched_clock.c
+++ b/kernel/sched_clock.c
@@ -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 {