58 lines
1.8 KiB
Diff
58 lines
1.8 KiB
Diff
From a57194f115acfc967aa0907bc130e95b68723121 Mon Sep 17 00:00:00 2001
|
|
From: Zhao Hongjiang <zhaohongjiang@huawei.com>
|
|
Date: Wed, 17 Apr 2013 17:44:16 +0800
|
|
Subject: [PATCH] timers: prepare for full preemption improve
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz
|
|
|
|
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>
|
|
---
|
|
kernel/time/timer.c | 8 ++++++--
|
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
--- a/kernel/time/timer.c
|
|
+++ b/kernel/time/timer.c
|
|
@@ -78,7 +78,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;
|
|
unsigned long active_timers;
|
|
@@ -983,7 +985,7 @@ static void wait_for_running_timer(struc
|
|
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)
|
|
{
|
|
@@ -1241,7 +1243,7 @@ static inline void __run_timers(struct t
|
|
}
|
|
}
|
|
}
|
|
- wake_up(&base->wait_for_running_timer);
|
|
+ wakeup_timer_waiters(base);
|
|
spin_unlock_irq(&base->lock);
|
|
}
|
|
|
|
@@ -1599,7 +1601,9 @@ static int init_timers_cpu(int cpu)
|
|
base = per_cpu(tvec_bases, cpu);
|
|
}
|
|
|
|
+#ifdef CONFIG_PREEMPT_RT_FULL
|
|
init_waitqueue_head(&base->wait_for_running_timer);
|
|
+#endif
|
|
|
|
for (j = 0; j < TVN_SIZE; j++) {
|
|
INIT_LIST_HEAD(base->tv5.vec + j);
|