aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index cc6c1192c448..3eed860cf292 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -383,13 +383,12 @@ static inline unsigned long long rq_clock(struct rq *rq)
383 */ 383 */
384unsigned long long cpu_clock(int cpu) 384unsigned long long cpu_clock(int cpu)
385{ 385{
386 struct rq *rq = cpu_rq(cpu);
387 unsigned long long now; 386 unsigned long long now;
388 unsigned long flags; 387 unsigned long flags;
389 388
390 spin_lock_irqsave(&rq->lock, flags); 389 local_irq_save(flags);
391 now = rq_clock(rq); 390 now = rq_clock(cpu_rq(cpu));
392 spin_unlock_irqrestore(&rq->lock, flags); 391 local_irq_restore(flags);
393 392
394 return now; 393 return now;
395} 394}