Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248634
b: refs/heads/master
c: 7372b0b
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Thomas Gleixner committed May 5, 2011
1 parent fc0a752 commit 55fe365
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 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: 179eb03268aa1da03d90f1566ea85dc1478d3ae3
refs/heads/master: 7372b0b122af0f6675f3ab65bfd91c8a438e0480
16 changes: 9 additions & 7 deletions trunk/kernel/time/tick-broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,23 +456,27 @@ void tick_broadcast_oneshot_control(unsigned long reason)
unsigned long flags;
int cpu;

raw_spin_lock_irqsave(&tick_broadcast_lock, flags);

/*
* Periodic mode does not care about the enter/exit of power
* states
*/
if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
goto out;
return;

bc = tick_broadcast_device.evtdev;
/*
* We are called with preemtion disabled from the depth of the
* idle code, so we can't be moved away.
*/
cpu = smp_processor_id();
td = &per_cpu(tick_cpu_device, cpu);
dev = td->evtdev;

if (!(dev->features & CLOCK_EVT_FEAT_C3STOP))
goto out;
return;

bc = tick_broadcast_device.evtdev;

raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
if (reason == CLOCK_EVT_NOTIFY_BROADCAST_ENTER) {
if (!cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {
cpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask());
Expand All @@ -489,8 +493,6 @@ void tick_broadcast_oneshot_control(unsigned long reason)
tick_program_event(dev->next_event, 1);
}
}

out:
raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
}

Expand Down

0 comments on commit 55fe365

Please sign in to comment.