diff options
| -rw-r--r-- | kernel/time/tick-broadcast.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index bf57abdc7bd0..119aca5c6845 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
| @@ -531,7 +531,6 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc) | |||
| 531 | int was_periodic = bc->mode == CLOCK_EVT_MODE_PERIODIC; | 531 | int was_periodic = bc->mode == CLOCK_EVT_MODE_PERIODIC; |
| 532 | 532 | ||
| 533 | bc->event_handler = tick_handle_oneshot_broadcast; | 533 | bc->event_handler = tick_handle_oneshot_broadcast; |
| 534 | clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); | ||
| 535 | 534 | ||
| 536 | /* Take the do_timer update */ | 535 | /* Take the do_timer update */ |
| 537 | tick_do_timer_cpu = cpu; | 536 | tick_do_timer_cpu = cpu; |
| @@ -549,6 +548,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc) | |||
| 549 | to_cpumask(tmpmask)); | 548 | to_cpumask(tmpmask)); |
| 550 | 549 | ||
| 551 | if (was_periodic && !cpumask_empty(to_cpumask(tmpmask))) { | 550 | if (was_periodic && !cpumask_empty(to_cpumask(tmpmask))) { |
| 551 | clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); | ||
| 552 | tick_broadcast_init_next_event(to_cpumask(tmpmask), | 552 | tick_broadcast_init_next_event(to_cpumask(tmpmask), |
| 553 | tick_next_period); | 553 | tick_next_period); |
| 554 | tick_broadcast_set_event(tick_next_period, 1); | 554 | tick_broadcast_set_event(tick_next_period, 1); |
| @@ -577,15 +577,10 @@ void tick_broadcast_switch_to_oneshot(void) | |||
| 577 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); | 577 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); |
| 578 | 578 | ||
| 579 | tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT; | 579 | tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT; |
| 580 | |||
| 581 | if (cpumask_empty(tick_get_broadcast_mask())) | ||
| 582 | goto end; | ||
| 583 | |||
| 584 | bc = tick_broadcast_device.evtdev; | 580 | bc = tick_broadcast_device.evtdev; |
| 585 | if (bc) | 581 | if (bc) |
| 586 | tick_broadcast_setup_oneshot(bc); | 582 | tick_broadcast_setup_oneshot(bc); |
| 587 | 583 | ||
| 588 | end: | ||
| 589 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); | 584 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); |
| 590 | } | 585 | } |
| 591 | 586 | ||
