]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 2857/2: Dynamic tick - fix OOPS if configured and not provided
authorBen Dooks <ben-linux@fluff.org>
Wed, 31 Aug 2005 08:42:14 +0000 (09:42 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 31 Aug 2005 08:42:14 +0000 (09:42 +0100)
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>
arch/arm/kernel/time.c

index 1b7fcd50c3e25c8a208bc3347dc55dc7d0605e1e..8880482dcbffd4dbbfb20ea98def232de3b439d1 100644 (file)
@@ -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)