diff options
Diffstat (limited to 'kernel')
-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 4790037163f6..248f80dba746 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -492,7 +492,15 @@ void tick_check_oneshot_broadcast(int cpu) | |||
492 | if (cpumask_test_cpu(cpu, tick_broadcast_oneshot_mask)) { | 492 | if (cpumask_test_cpu(cpu, tick_broadcast_oneshot_mask)) { |
493 | struct tick_device *td = &per_cpu(tick_cpu_device, cpu); | 493 | struct tick_device *td = &per_cpu(tick_cpu_device, cpu); |
494 | 494 | ||
495 | clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_ONESHOT); | 495 | /* |
496 | * We might be in the middle of switching over from | ||
497 | * periodic to oneshot. If the CPU has not yet | ||
498 | * switched over, leave the device alone. | ||
499 | */ | ||
500 | if (td->mode == TICKDEV_MODE_ONESHOT) { | ||
501 | clockevents_set_mode(td->evtdev, | ||
502 | CLOCK_EVT_MODE_ONESHOT); | ||
503 | } | ||
496 | } | 504 | } |
497 | } | 505 | } |
498 | 506 | ||