summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 9a78441..b96559c 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 {
OpenPOWER on IntegriCloud