Commit 56b90612 authored by Ingo Molnar's avatar Ingo Molnar

sched clock: simplify __update_sched_clock()

- return the current clock instead of letting callers
  fetch it from scd->clock
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: default avatarMike Galbraith <efault@gmx.de>
parent 18e4e36c
...@@ -97,7 +97,7 @@ void sched_clock_init(void) ...@@ -97,7 +97,7 @@ void sched_clock_init(void)
* - filter out backward motion * - filter out backward motion
* - use jiffies to generate a min,max window to clip the raw values * - use jiffies to generate a min,max window to clip the raw values
*/ */
static void __update_sched_clock(struct sched_clock_data *scd, u64 now) static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now)
{ {
unsigned long now_jiffies = jiffies; unsigned long now_jiffies = jiffies;
long delta_jiffies = now_jiffies - scd->tick_jiffies; long delta_jiffies = now_jiffies - scd->tick_jiffies;
...@@ -130,6 +130,8 @@ static void __update_sched_clock(struct sched_clock_data *scd, u64 now) ...@@ -130,6 +130,8 @@ static void __update_sched_clock(struct sched_clock_data *scd, u64 now)
scd->tick_jiffies = now_jiffies; scd->tick_jiffies = now_jiffies;
scd->clock = clock; scd->clock = clock;
return clock;
} }
static void lock_double_clock(struct sched_clock_data *data1, static void lock_double_clock(struct sched_clock_data *data1,
...@@ -174,8 +176,7 @@ u64 sched_clock_cpu(int cpu) ...@@ -174,8 +176,7 @@ u64 sched_clock_cpu(int cpu)
__raw_spin_lock(&scd->lock); __raw_spin_lock(&scd->lock);
} }
__update_sched_clock(scd, now); clock = __update_sched_clock(scd, now);
clock = scd->clock;
__raw_spin_unlock(&scd->lock); __raw_spin_unlock(&scd->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment