Skip to content

Commit

Permalink
[ARM] 2857/2: Dynamic tick - fix OOPS if configured and not provided
Browse files Browse the repository at this point in the history
Patch from Ben Dooks

timer_dyn_reprogram() fails with an OOPS if the
configuration for CONFIG_NO_IDLE_HZ is enabled, and
the system has no support for it.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Ben Dooks authored and Russell King committed Aug 31, 2005
1 parent 083bc6b commit 3618886
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions arch/arm/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,12 @@ void timer_dyn_reprogram(void)
{
struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick;

write_seqlock(&xtime_lock);
if (dyn_tick->state & DYN_TICK_ENABLED)
dyn_tick->reprogram(next_timer_interrupt() - jiffies);
write_sequnlock(&xtime_lock);
if (dyn_tick) {
write_seqlock(&xtime_lock);
if (dyn_tick->state & DYN_TICK_ENABLED)
dyn_tick->reprogram(next_timer_interrupt() - jiffies);
write_sequnlock(&xtime_lock);
}
}

static ssize_t timer_show_dyn_tick(struct sys_device *dev, char *buf)
Expand Down

0 comments on commit 3618886

Please sign in to comment.