clockevents: do not shutdown the oneshot broadcast device
authorThomas Gleixner <tglx@linutronix.de>
Sun, 16 Sep 2007 13:36:43 +0000 (15:36 +0200)
committerThomas Gleixner <tglx@chaos.(none)>
Sun, 16 Sep 2007 13:36:43 +0000 (15:36 +0200)
When a cpu goes offline it is removed from the broadcast masks. If the
mask becomes empty the code shuts down the broadcast device. This is
wrong, because the broadcast device needs to be ready for the online
cpu going idle (into a c-state, which stops the local apic timer).

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

index 947959fb2bb5765c4aef8ec29fd9637c4a5f75a1..aab881c86a1ab94eb03b3468fbfe3a2b65ebd7e9 100644 (file)
@@ -560,20 +560,17 @@ void tick_broadcast_switch_to_oneshot(void)
  */
 void tick_shutdown_broadcast_oneshot(unsigned int *cpup)
 {
-       struct clock_event_device *bc;
        unsigned long flags;
        unsigned int cpu = *cpup;
 
        spin_lock_irqsave(&tick_broadcast_lock, flags);
 
-       bc = tick_broadcast_device.evtdev;
+       /*
+        * Clear the broadcast mask flag for the dead cpu, but do not
+        * stop the broadcast device!
+        */
        cpu_clear(cpu, tick_broadcast_oneshot_mask);
 
-       if (tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT) {
-               if (bc && cpus_empty(tick_broadcast_oneshot_mask))
-                       clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN);
-       }
-
        spin_unlock_irqrestore(&tick_broadcast_lock, flags);
 }