sched: Use an accessor to read the rq clock
[firefly-linux-kernel-4.4.55.git] / kernel / sched / stop_task.c
index da5eb5bed84a2ca8db2443ccb71817d48f06c1f5..e08fbeeb54b9ffecf77bc8cdfc5b5ad7b63455f7 100644 (file)
@@ -28,7 +28,7 @@ static struct task_struct *pick_next_task_stop(struct rq *rq)
        struct task_struct *stop = rq->stop;
 
        if (stop && stop->on_rq) {
-               stop->se.exec_start = rq->clock_task;
+               stop->se.exec_start = rq_clock_task(rq);
                return stop;
        }
 
@@ -57,7 +57,7 @@ static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
        struct task_struct *curr = rq->curr;
        u64 delta_exec;
 
-       delta_exec = rq->clock_task - curr->se.exec_start;
+       delta_exec = rq_clock_task(rq) - curr->se.exec_start;
        if (unlikely((s64)delta_exec < 0))
                delta_exec = 0;
 
@@ -67,7 +67,7 @@ static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
        curr->se.sum_exec_runtime += delta_exec;
        account_group_exec_runtime(curr, delta_exec);
 
-       curr->se.exec_start = rq->clock_task;
+       curr->se.exec_start = rq_clock_task(rq);
        cpuacct_charge(curr, delta_exec);
 }
 
@@ -79,7 +79,7 @@ static void set_curr_task_stop(struct rq *rq)
 {
        struct task_struct *stop = rq->stop;
 
-       stop->se.exec_start = rq->clock_task;
+       stop->se.exec_start = rq_clock_task(rq);
 }
 
 static void switched_to_stop(struct rq *rq, struct task_struct *p)