Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312378
b: refs/heads/master
c: e40468a
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Jun 6, 2012
1 parent 8a38aba commit c764068
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 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: 99d5f3aac674fe081ffddd2dbb8946ccbc14c410
refs/heads/master: e40468a54882ef7411fb178dbf2e465ec2349af7
13 changes: 8 additions & 5 deletions trunk/kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,18 +1326,21 @@ static unsigned long cmp_next_hrtimer_event(unsigned long now,
unsigned long get_next_timer_interrupt(unsigned long now)
{
struct tvec_base *base = __this_cpu_read(tvec_bases);
unsigned long expires;
unsigned long expires = now + NEXT_TIMER_MAX_DELTA;

/*
* Pretend that there is no timer pending if the cpu is offline.
* Possible pending timers will be migrated later to an active cpu.
*/
if (cpu_is_offline(smp_processor_id()))
return now + NEXT_TIMER_MAX_DELTA;
return expires;

spin_lock(&base->lock);
if (time_before_eq(base->next_timer, base->timer_jiffies))
base->next_timer = __next_timer_interrupt(base);
expires = base->next_timer;
if (base->active_timers) {
if (time_before_eq(base->next_timer, base->timer_jiffies))
base->next_timer = __next_timer_interrupt(base);
expires = base->next_timer;
}
spin_unlock(&base->lock);

if (time_before_eq(expires, now))
Expand Down

0 comments on commit c764068

Please sign in to comment.