diff options
-rw-r--r-- | kernel/time/tick-broadcast.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index c389f068aca2..297b90b5277e 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -522,7 +522,15 @@ void tick_check_oneshot_broadcast(int cpu) | |||
522 | if (cpumask_test_cpu(cpu, tick_broadcast_oneshot_mask)) { | 522 | if (cpumask_test_cpu(cpu, tick_broadcast_oneshot_mask)) { |
523 | struct tick_device *td = &per_cpu(tick_cpu_device, cpu); | 523 | struct tick_device *td = &per_cpu(tick_cpu_device, cpu); |
524 | 524 | ||
525 | clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_ONESHOT); | 525 | /* |
526 | * We might be in the middle of switching over from | ||
527 | * periodic to oneshot. If the CPU has not yet | ||
528 | * switched over, leave the device alone. | ||
529 | */ | ||
530 | if (td->mode == TICKDEV_MODE_ONESHOT) { | ||
531 | clockevents_set_mode(td->evtdev, | ||
532 | CLOCK_EVT_MODE_ONESHOT); | ||
533 | } | ||
526 | } | 534 | } |
527 | } | 535 | } |
528 | 536 | ||