diff options
author | Zhao Hongjiang <zhaohongjiang@huawei.com> | 2013-04-17 17:44:16 +0800 |
---|---|---|
committer | Steven Rostedt <rostedt@rostedt.homelinux.com> | 2014-03-24 18:27:10 -0400 |
commit | f6c77c51c54f6a9c8acffb8d6e2c12df57aded7c (patch) | |
tree | fd1fc16026c0c94fc612e26b763c30d01df4c3ad | |
parent | 36dedc2a1c6d217d6616ae694bb439632e8a70c9 (diff) |
timers: prepare for full preemption improve
wake_up should do nothing on the nort, so we should use wakeup_timer_waiters,
also fix a spell mistake.
Cc: stable-rt@vger.kernel.org
Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
[bigeasy: s/CONFIG_PREEMPT_RT_BASE/CONFIG_PREEMPT_RT_FULL/]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-rw-r--r-- | kernel/timer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index 231f5e0bf8f3..78f07e5a0bdf 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -76,7 +76,9 @@ struct tvec_root { struct tvec_base { spinlock_t lock; struct timer_list *running_timer; +#ifdef CONFIG_PREEMPT_RT_FULL wait_queue_head_t wait_for_running_timer; +#endif unsigned long timer_jiffies; unsigned long next_timer; struct tvec_root tv1; @@ -976,7 +978,7 @@ static void wait_for_running_timer(struct timer_list *timer) base->running_timer != timer); } -# define wakeup_timer_waiters(b) wake_up(&(b)->wait_for_tunning_timer) +# define wakeup_timer_waiters(b) wake_up(&(b)->wait_for_running_timer) #else static inline void wait_for_running_timer(struct timer_list *timer) { @@ -1233,7 +1235,7 @@ static inline void __run_timers(struct tvec_base *base) spin_lock_irq(&base->lock); } } - wake_up(&base->wait_for_running_timer); + wakeup_timer_waiters(base); spin_unlock_irq(&base->lock); } @@ -1756,7 +1758,9 @@ static int __cpuinit init_timers_cpu(int cpu) base = &boot_tvec_bases; } spin_lock_init(&base->lock); +#ifdef CONFIG_PREEMPT_RT_FULL init_waitqueue_head(&base->wait_for_running_timer); +#endif tvec_base_done[cpu] = 1; } else { base = per_cpu(tvec_bases, cpu); |