summaryrefslogtreecommitdiffstats
path: root/hrtimer-fix-wait_for_hrtimer.patch
blob: e9365d8b1e636949d17a27a443b56d97d9c1f7c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 2477b29593fa5380c4edb761fac192c15ad9ec89 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 3 Jul 2009 08:44:31 -0500
Subject: [PATCH] hrtimer: fix wait_for_hrtimer

commit 0f66f95674f33b5b107cc9aef34c61aaf920604f in tip.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 kernel/hrtimer.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 05302de..834e1bc 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -924,7 +924,7 @@ static int enqueue_hrtimer(struct hrtimer *timer,
 	return leftmost;
 }
 
-#ifdef CONFIG_PREEMPT_SOFTIRQS
+#ifdef CONFIG_PREEMPT_RT
 # define wake_up_timer_waiters(b)	wake_up(&(b)->wait)
 
 /**
@@ -941,9 +941,9 @@ void hrtimer_wait_for_timer(const struct hrtimer *timer)
 {
 	struct hrtimer_clock_base *base = timer->base;
 
-	if (base && base->cpu_base && !hrtimer_hres_active(base->cpu_base))
+	if (base && base->cpu_base && !timer->irqsafe)
 		wait_event(base->cpu_base->wait,
-				!(timer->state & HRTIMER_STATE_CALLBACK));
+			   !(timer->state & HRTIMER_STATE_CALLBACK));
 }
 
 #else
@@ -1791,7 +1791,7 @@ static void __cpuinit init_hrtimers_cpu(int cpu)
 	}
 
 	hrtimer_init_hres(cpu_base);
-#ifdef CONFIG_PREEMPT_SOFTIRQS
+#ifdef CONFIG_PREEMPT_RT
 	init_waitqueue_head(&cpu_base->wait);
 #endif
 }
-- 
1.7.0.4