Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67772
b: refs/heads/master
c: 4a93232
h: refs/heads/master
v: v3
  • Loading branch information
Venki Pallipadi authored and Thomas Gleixner committed Oct 12, 2007
1 parent a2c14b8 commit 35010a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31c435d75e7d15a5f965c5eb0e33fe0e236f49a4
refs/heads/master: 4a93232dab0a07074bcc5291a0f1f39919916f31
13 changes: 6 additions & 7 deletions trunk/kernel/time/tick-broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

/*
Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/time/tick-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static int tick_check_new_device(struct clock_event_device *newdev)

cpu = smp_processor_id();
if (!cpu_isset(cpu, newdev->cpumask))
goto out;
goto out_bc;

td = &per_cpu(tick_cpu_device, cpu);
curdev = td->evtdev;
Expand Down Expand Up @@ -265,7 +265,7 @@ static int tick_check_new_device(struct clock_event_device *newdev)
*/
if (tick_check_broadcast_device(newdev))
ret = NOTIFY_STOP;
out:

spin_unlock_irqrestore(&tick_device_lock, flags);

return ret;
Expand Down

0 comments on commit 35010a8

Please sign in to comment.