|
@@ -456,23 +456,27 @@ void tick_broadcast_oneshot_control(unsigned long reason)
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
int cpu;
|
|
int cpu;
|
|
|
|
|
|
- raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* Periodic mode does not care about the enter/exit of power
|
|
* Periodic mode does not care about the enter/exit of power
|
|
* states
|
|
* states
|
|
*/
|
|
*/
|
|
if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
|
|
if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
|
|
- goto out;
|
|
|
|
|
|
+ return;
|
|
|
|
|
|
- bc = tick_broadcast_device.evtdev;
|
|
|
|
|
|
+ /*
|
|
|
|
+ * We are called with preemtion disabled from the depth of the
|
|
|
|
+ * idle code, so we can't be moved away.
|
|
|
|
+ */
|
|
cpu = smp_processor_id();
|
|
cpu = smp_processor_id();
|
|
td = &per_cpu(tick_cpu_device, cpu);
|
|
td = &per_cpu(tick_cpu_device, cpu);
|
|
dev = td->evtdev;
|
|
dev = td->evtdev;
|
|
|
|
|
|
if (!(dev->features & CLOCK_EVT_FEAT_C3STOP))
|
|
if (!(dev->features & CLOCK_EVT_FEAT_C3STOP))
|
|
- goto out;
|
|
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ bc = tick_broadcast_device.evtdev;
|
|
|
|
|
|
|
|
+ raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
|
|
if (reason == CLOCK_EVT_NOTIFY_BROADCAST_ENTER) {
|
|
if (reason == CLOCK_EVT_NOTIFY_BROADCAST_ENTER) {
|
|
if (!cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {
|
|
if (!cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {
|
|
cpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask());
|
|
cpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask());
|
|
@@ -489,8 +493,6 @@ void tick_broadcast_oneshot_control(unsigned long reason)
|
|
tick_program_event(dev->next_event, 1);
|
|
tick_program_event(dev->next_event, 1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-out:
|
|
|
|
raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
|
|
raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
|
|
}
|
|
}
|
|
|
|
|