Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48582
b: refs/heads/master
c: 5cfb6de
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Linus Torvalds committed Feb 16, 2007
1 parent 88f680d commit 3d61c87
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 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: 303e967ff90a9d19ad3f8c9028ccbfa7f408fbb3
refs/heads/master: 5cfb6de7cd7c8f04655c9d23533ca506647beace
1 change: 0 additions & 1 deletion trunk/include/linux/hrtimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ struct hrtimer_cpu_base {
spinlock_t lock;
struct lock_class_key lock_key;
struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
struct hrtimer *curr_timer;
};

/*
Expand Down
10 changes: 1 addition & 9 deletions trunk/kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ static inline int hrtimer_callback_running(struct hrtimer *timer)
*/
#ifdef CONFIG_SMP

#define set_curr_timer(b, t) do { (b)->curr_timer = (t); } while (0)

/*
* We are using hashed locking: holding per_cpu(hrtimer_bases)[n].lock
* means that all timers which are tied to this base via timer->base are
Expand Down Expand Up @@ -227,7 +225,7 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base)
* completed. There is no conflict as we hold the lock until
* the timer is enqueued.
*/
if (unlikely(base->cpu_base->curr_timer == timer))
if (unlikely(timer->state & HRTIMER_STATE_CALLBACK))
return base;

/* See the comment in lock_timer_base() */
Expand All @@ -241,8 +239,6 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base)

#else /* CONFIG_SMP */

#define set_curr_timer(b, t) do { } while (0)

static inline struct hrtimer_clock_base *
lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags)
{
Expand Down Expand Up @@ -670,7 +666,6 @@ static inline void run_hrtimer_queue(struct hrtimer_cpu_base *cpu_base,
break;

fn = timer->function;
set_curr_timer(cpu_base, timer);
__remove_hrtimer(timer, base, HRTIMER_STATE_CALLBACK);
spin_unlock_irq(&cpu_base->lock);

Expand All @@ -684,7 +679,6 @@ static inline void run_hrtimer_queue(struct hrtimer_cpu_base *cpu_base,
enqueue_hrtimer(timer, base);
}
}
set_curr_timer(cpu_base, NULL);
spin_unlock_irq(&cpu_base->lock);
}

Expand Down Expand Up @@ -871,8 +865,6 @@ static void migrate_hrtimers(int cpu)
spin_lock(&old_base->lock);

for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) {
BUG_ON(old_base->curr_timer);

migrate_hrtimer_list(&old_base->clock_base[i],
&new_base->clock_base[i]);
}
Expand Down

0 comments on commit 3d61c87

Please sign in to comment.