summaryrefslogtreecommitdiffstats
path: root/hrtimer-fix-reprogram-madness.patch
blob: ec68a0438218982682a642b817fcda2df5497518 (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
Subject: hrtimer-fix-reprogram-madness.patch
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 14 Sep 2011 14:48:43 +0200

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/hrtimer.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Index: linux-stable/kernel/hrtimer.c
===================================================================
--- linux-stable.orig/kernel/hrtimer.c
+++ linux-stable/kernel/hrtimer.c
@@ -1338,7 +1338,11 @@ static void hrtimer_rt_reprogram(int res
 		if (!enqueue_hrtimer(timer, base))
 			return;
 
-		if (hrtimer_reprogram(timer, base))
+#ifndef CONFIG_HIGH_RES_TIMERS
+	}
+#else
+		if (base->cpu_base->hres_active &&
+		    hrtimer_reprogram(timer, base))
 			goto requeue;
 
 	} else if (hrtimer_active(timer)) {
@@ -1347,6 +1351,7 @@ static void hrtimer_rt_reprogram(int res
 		 * the event device.
 		 */
 		if (&timer->node == base->active.next &&
+		    base->cpu_base->hres_active &&
 		    hrtimer_reprogram(timer, base))
 			goto requeue;
 	}
@@ -1359,6 +1364,7 @@ requeue:
 	 */
 	__remove_hrtimer(timer, base, timer->state, 0);
 	list_add_tail(&timer->cb_entry, &base->expired);
+#endif
 }
 
 /*