aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-09-16 09:36:43 -0400
committerThomas Gleixner <tglx@chaos.(none)>2007-09-16 09:36:43 -0400
commit31d9b3938c0459e5e9755ce0a98ac1e24eeff972 (patch)
treed397929e8d11626128c5c04cae43e5319a7be43a /kernel/time
parent07eec6af448d13a6a520d9c6f06f2e87f61b567a (diff)
clockevents: do not shutdown the oneshot broadcast device
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>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/tick-broadcast.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 947959fb2bb5..aab881c86a1a 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -560,20 +560,17 @@ void tick_broadcast_switch_to_oneshot(void)
560 */ 560 */
561void tick_shutdown_broadcast_oneshot(unsigned int *cpup) 561void tick_shutdown_broadcast_oneshot(unsigned int *cpup)
562{ 562{
563 struct clock_event_device *bc;
564 unsigned long flags; 563 unsigned long flags;
565 unsigned int cpu = *cpup; 564 unsigned int cpu = *cpup;
566 565
567 spin_lock_irqsave(&tick_broadcast_lock, flags); 566 spin_lock_irqsave(&tick_broadcast_lock, flags);
568 567
569 bc = tick_broadcast_device.evtdev; 568 /*
569 * Clear the broadcast mask flag for the dead cpu, but do not
570 * stop the broadcast device!
571 */
570 cpu_clear(cpu, tick_broadcast_oneshot_mask); 572 cpu_clear(cpu, tick_broadcast_oneshot_mask);
571 573
572 if (tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT) {
573 if (bc && cpus_empty(tick_broadcast_oneshot_mask))
574 clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN);
575 }
576
577 spin_unlock_irqrestore(&tick_broadcast_lock, flags); 574 spin_unlock_irqrestore(&tick_broadcast_lock, flags);
578} 575}
579 576