aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_clock.c
diff options
context:
space:
mode:
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)
169 169
170 lock_double_clock(scd, my_scd); 170 lock_double_clock(scd, my_scd);
171 171
172 now -= my_scd->tick_raw; 172 now += scd->tick_raw - my_scd->tick_raw;
173 now += scd->tick_raw; 173 now += my_scd->tick_gtod - scd->tick_gtod;
174
175 now += my_scd->tick_gtod;
176 now -= scd->tick_gtod;
177 174
178 __raw_spin_unlock(&my_scd->lock); 175 __raw_spin_unlock(&my_scd->lock);
179 } else { 176 } else {