diff options
Diffstat (limited to 'kernel/sched_clock.c')
-rw-r--r-- | kernel/sched_clock.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c index 4b8474c966dc..857a1291fd23 100644 --- a/kernel/sched_clock.c +++ b/kernel/sched_clock.c | |||
@@ -97,7 +97,7 @@ void sched_clock_init(void) | |||
97 | * - filter out backward motion | 97 | * - filter out backward motion |
98 | * - use jiffies to generate a min,max window to clip the raw values | 98 | * - use jiffies to generate a min,max window to clip the raw values |
99 | */ | 99 | */ |
100 | static void __update_sched_clock(struct sched_clock_data *scd, u64 now) | 100 | static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now) |
101 | { | 101 | { |
102 | unsigned long now_jiffies = jiffies; | 102 | unsigned long now_jiffies = jiffies; |
103 | long delta_jiffies = now_jiffies - scd->tick_jiffies; | 103 | 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 | 130 | ||
131 | scd->tick_jiffies = now_jiffies; | 131 | scd->tick_jiffies = now_jiffies; |
132 | scd->clock = clock; | 132 | scd->clock = clock; |
133 | |||
134 | return clock; | ||
133 | } | 135 | } |
134 | 136 | ||
135 | static void lock_double_clock(struct sched_clock_data *data1, | 137 | static void lock_double_clock(struct sched_clock_data *data1, |
@@ -174,8 +176,7 @@ u64 sched_clock_cpu(int cpu) | |||
174 | __raw_spin_lock(&scd->lock); | 176 | __raw_spin_lock(&scd->lock); |
175 | } | 177 | } |
176 | 178 | ||
177 | __update_sched_clock(scd, now); | 179 | clock = __update_sched_clock(scd, now); |
178 | clock = scd->clock; | ||
179 | 180 | ||
180 | __raw_spin_unlock(&scd->lock); | 181 | __raw_spin_unlock(&scd->lock); |
181 | 182 | ||