linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] timers: prepare for full preemption improve
@ 2013-04-17  9:44 Zhao Hongjiang
  2013-06-07  8:32 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 2+ messages in thread
From: Zhao Hongjiang @ 2013-04-17  9:44 UTC (permalink / raw)
  To: linux-rt-users; +Cc: tglx, rostedt

wake_up should do nothing on the nort, so we should use wakeup_timer_waiters,
also fix a spell mistake.

Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
---
 kernel/timer.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index 62fc642..211e836 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_BASE
 	wait_queue_head_t wait_for_running_timer;
+#endif
 	unsigned long timer_jiffies;
 	unsigned long next_timer;
 	struct tvec_root tv1;
@@ -974,7 +976,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)
 {
@@ -1231,7 +1233,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);
 }
 
@@ -1759,7 +1761,9 @@ static int __cpuinit init_timers_cpu(int cpu)
 	}
 
 	spin_lock_init(&base->lock);
+#ifdef CONFIG_PREEMPT_RT_BASE
 	init_waitqueue_head(&base->wait_for_running_timer);
+#endif
 
 	for (j = 0; j < TVN_SIZE; j++) {
 		INIT_LIST_HEAD(base->tv5.vec + j);
-- 1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] timers: prepare for full preemption improve
  2013-04-17  9:44 [PATCH] timers: prepare for full preemption improve Zhao Hongjiang
@ 2013-06-07  8:32 ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-06-07  8:32 UTC (permalink / raw)
  To: Zhao Hongjiang; +Cc: linux-rt-users, tglx, rostedt

* Zhao Hongjiang | 2013-04-17 17:44:16 [+0800]:

>wake_up should do nothing on the nort, so we should use wakeup_timer_waiters,
>also fix a spell mistake.
>
>Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>

Applied. I added CONFIG_PREEMPT_RT_FULL instead of
CONFIG_PREEMPT_RT_BASE because wakeup_timer_waiters() is defined under
CONFIG_PREEMPT_RT_FULL.

Sebastian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-07  8:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17  9:44 [PATCH] timers: prepare for full preemption improve Zhao Hongjiang
2013-06-07  8:32 ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).