|
@@ -64,8 +64,9 @@ static void tick_broadcast_start_periodic(struct clock_event_device *bc)
|
|
|
*/
|
|
|
int tick_check_broadcast_device(struct clock_event_device *dev)
|
|
|
{
|
|
|
- if (tick_broadcast_device.evtdev ||
|
|
|
- (dev->features & CLOCK_EVT_FEAT_C3STOP))
|
|
|
+ if ((tick_broadcast_device.evtdev &&
|
|
|
+ tick_broadcast_device.evtdev->rating >= dev->rating) ||
|
|
|
+ (dev->features & CLOCK_EVT_FEAT_C3STOP))
|
|
|
return 0;
|
|
|
|
|
|
clockevents_exchange_device(NULL, dev);
|
|
@@ -513,11 +514,9 @@ static void tick_broadcast_clear_oneshot(int cpu)
|
|
|
*/
|
|
|
void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
|
|
|
{
|
|
|
- if (bc->mode != CLOCK_EVT_MODE_ONESHOT) {
|
|
|
- bc->event_handler = tick_handle_oneshot_broadcast;
|
|
|
- clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
|
|
|
- bc->next_event.tv64 = KTIME_MAX;
|
|
|
- }
|
|
|
+ bc->event_handler = tick_handle_oneshot_broadcast;
|
|
|
+ clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
|
|
|
+ bc->next_event.tv64 = KTIME_MAX;
|
|
|
}
|
|
|
|
|
|
/*
|