]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
clockevents: prevent stale tick_next_period for onlining CPUs
authorThomas Gleixner <tglx@linutronix.de>
Mon, 22 Sep 2008 16:56:01 +0000 (18:56 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 23 Sep 2008 09:38:53 +0000 (11:38 +0200)
Impact: possible hang on CPU onlining in timer one shot mode.

The tick_next_period variable is only used during boot on nohz/highres
enabled systems, but for CPU onlining it needs to be maintained when
the per cpu clock events device operates in one shot mode.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/time/tick-sched.c

index 31a14e8caac1aab78ff91651e77f0e5e48c245cf..39019b3f76212939ef47903864511bd7e3b5430d 100644 (file)
@@ -75,6 +75,9 @@ static void tick_do_update_jiffies64(ktime_t now)
                                                           incr * ticks);
                }
                do_timer(++ticks);
+
+               /* Keep the tick_next_period variable up to date */
+               tick_next_period = ktime_add(last_jiffies_update, tick_period);
        }
        write_sequnlock(&xtime_lock);
 }