diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-03-25 12:53:44 +0530 |
---|---|---|
committer | Gary S. Robertson <gary.robertson@linaro.org> | 2015-07-22 16:17:08 -0500 |
commit | c25bd30f4b5919d9fa87c4d298d8920e3f2c39b7 (patch) | |
tree | 4b51bef9f46944bf823c5bcebf66da3cd340a931 | |
parent | 451d0fcf3d9535a0a494c07066b52b29bf129bad (diff) |
hrtimer: reprogram event for expires=KTIME_MAX in hrtimer_force_reprogram()
In hrtimer_force_reprogram(), we are reprogramming event device only if the next
timer event is before KTIME_MAX. But what if it is equal to KTIME_MAX? As we
aren't reprogramming it again, it will be set to the last value it was, probably
tick interval, i.e. few milliseconds.
And we will get a interrupt due to that, wouldn't have any hrtimers to service
and return without doing much. But the implementation of event device's driver
may make it more stupid. For example: drivers/clocksource/arm_arch_timer.c
disables the event device only on SHUTDOWN/UNUSED requests in set-mode.
Otherwise, it will keep giving interrupts at tick interval even if
hrtimer_interrupt() didn't reprogram tick..
To get this fixed, lets reprogram event device even for KTIME_MAX, so that the
timer is scheduled for long enough.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
[forward port to 3.18 kernel]
Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
-rw-r--r-- | kernel/time/hrtimer.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 943cf4b74eeb..cc6d4b745d9a 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -539,8 +539,7 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal) if (cpu_base->hang_detected) return; - if (cpu_base->expires_next.tv64 != KTIME_MAX) - tick_program_event(cpu_base->expires_next, 1); + tick_program_event(cpu_base->expires_next, 1); } /* |