blob: 68f446d4e827ec3681f8f01ad40cb5e5e272f668 [file] [log] [blame]
From 2f0249e2c9e83854cb1e09c6d5dacd9959222b38 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>
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.1.1