diff options
author | Ben Dooks <ben-linux@fluff.org> | 2005-08-31 04:42:14 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-08-31 04:42:14 -0400 |
commit | 3618886f645c2ede45742d3e3d22a96b2ee2f527 (patch) | |
tree | 7fdfb43dd3a4db112343caccce091c12435210da /arch/arm/kernel | |
parent | 083bc6b3c9b52b5998cc49d4aa2f8f15c2e84e6b (diff) |
[ARM] 2857/2: Dynamic tick - fix OOPS if configured and not provided
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>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/time.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 1b7fcd50c3e2..8880482dcbff 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -433,10 +433,12 @@ void timer_dyn_reprogram(void) | |||
433 | { | 433 | { |
434 | struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick; | 434 | struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick; |
435 | 435 | ||
436 | write_seqlock(&xtime_lock); | 436 | if (dyn_tick) { |
437 | if (dyn_tick->state & DYN_TICK_ENABLED) | 437 | write_seqlock(&xtime_lock); |
438 | dyn_tick->reprogram(next_timer_interrupt() - jiffies); | 438 | if (dyn_tick->state & DYN_TICK_ENABLED) |
439 | write_sequnlock(&xtime_lock); | 439 | dyn_tick->reprogram(next_timer_interrupt() - jiffies); |
440 | write_sequnlock(&xtime_lock); | ||
441 | } | ||
440 | } | 442 | } |
441 | 443 | ||
442 | static ssize_t timer_show_dyn_tick(struct sys_device *dev, char *buf) | 444 | static ssize_t timer_show_dyn_tick(struct sys_device *dev, char *buf) |