diff options
Diffstat (limited to 'kernel/time/tick-broadcast.c')
-rw-r--r-- | kernel/time/tick-broadcast.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index 0962e0577660..298bc7c6f09f 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -64,8 +64,9 @@ static void tick_broadcast_start_periodic(struct clock_event_device *bc) | |||
64 | */ | 64 | */ |
65 | int tick_check_broadcast_device(struct clock_event_device *dev) | 65 | int tick_check_broadcast_device(struct clock_event_device *dev) |
66 | { | 66 | { |
67 | if (tick_broadcast_device.evtdev || | 67 | if ((tick_broadcast_device.evtdev && |
68 | (dev->features & CLOCK_EVT_FEAT_C3STOP)) | 68 | tick_broadcast_device.evtdev->rating >= dev->rating) || |
69 | (dev->features & CLOCK_EVT_FEAT_C3STOP)) | ||
69 | return 0; | 70 | return 0; |
70 | 71 | ||
71 | clockevents_exchange_device(NULL, dev); | 72 | clockevents_exchange_device(NULL, dev); |
@@ -176,8 +177,6 @@ static void tick_do_periodic_broadcast(void) | |||
176 | */ | 177 | */ |
177 | static void tick_handle_periodic_broadcast(struct clock_event_device *dev) | 178 | static void tick_handle_periodic_broadcast(struct clock_event_device *dev) |
178 | { | 179 | { |
179 | dev->next_event.tv64 = KTIME_MAX; | ||
180 | |||
181 | tick_do_periodic_broadcast(); | 180 | tick_do_periodic_broadcast(); |
182 | 181 | ||
183 | /* | 182 | /* |
@@ -515,11 +514,9 @@ static void tick_broadcast_clear_oneshot(int cpu) | |||
515 | */ | 514 | */ |
516 | void tick_broadcast_setup_oneshot(struct clock_event_device *bc) | 515 | void tick_broadcast_setup_oneshot(struct clock_event_device *bc) |
517 | { | 516 | { |
518 | if (bc->mode != CLOCK_EVT_MODE_ONESHOT) { | 517 | bc->event_handler = tick_handle_oneshot_broadcast; |
519 | bc->event_handler = tick_handle_oneshot_broadcast; | 518 | clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); |
520 | clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); | 519 | bc->next_event.tv64 = KTIME_MAX; |
521 | bc->next_event.tv64 = KTIME_MAX; | ||
522 | } | ||
523 | } | 520 | } |
524 | 521 | ||
525 | /* | 522 | /* |