@@ -348,15 +348,14 @@ static void tick_do_broadcast_on_off(unsigned long *reason)
bc_stopped = cpumask_empty(tick_broadcast_mask);
switch (*reason) {
- case CLOCK_EVT_NOTIFY_BROADCAST_ON:
case CLOCK_EVT_NOTIFY_BROADCAST_FORCE:
+ tick_broadcast_force = 1;
+ case CLOCK_EVT_NOTIFY_BROADCAST_ON:
cpumask_set_cpu(cpu, tick_broadcast_on);
if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_mask)) {
if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
clockevents_shutdown(dev);
}
- if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
- tick_broadcast_force = 1;
break;
case CLOCK_EVT_NOTIFY_BROADCAST_OFF:
if (tick_broadcast_force)
We are doing an extra comparison in tick_do_broadcast_on_off(): if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE) tick_broadcast_force = 1; Whereas it can be handled easily in the switch block only. It doesn't look like there is any strict ordering of instructions required here and so move setting 'tick_broadcast_force' at the beginning. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- kernel/time/tick-broadcast.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)