linux/debian/patches/features/all/rt/0137-hrtimer-fix-reprogram-...

47 lines
1.2 KiB
Diff

From 20c7ecda97cdc50c979bb2d055a525104f390721 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 14 Sep 2011 14:48:43 +0200
Subject: [PATCH 137/278] hrtimer-fix-reprogram-madness.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/hrtimer.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 34b3232..3848761 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1327,7 +1327,11 @@ static void hrtimer_rt_reprogram(int restart, struct hrtimer *timer,
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)) {
@@ -1336,6 +1340,7 @@ static void hrtimer_rt_reprogram(int restart, struct hrtimer *timer,
* the event device.
*/
if (&timer->node == base->active.next &&
+ base->cpu_base->hres_active &&
hrtimer_reprogram(timer, base))
goto requeue;
}
@@ -1348,6 +1353,7 @@ requeue:
*/
__remove_hrtimer(timer, base, timer->state, 0);
list_add_tail(&timer->cb_entry, &base->expired);
+#endif
}
/*
--
1.7.10