summaryrefslogtreecommitdiff
path: root/kernel/timer.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-17 20:08:38 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:19:29 (GMT)
commit3040e993d5358ce7362d791f465f0b0c42b5fb3a (patch)
treeb7f1b2b7e31dc553769692b6129804c07a07bbad /kernel/timer.c
parent974238cc2d9ba6d79575f764bc76ccc7d2b63d27 (diff)
downloadlinux-fsl-qoriq-3040e993d5358ce7362d791f465f0b0c42b5fb3a.tar.xz
timer-handle-idle-trylock-in-get-next-timer-irq.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/timer.c')
-rw-r--r--kernel/timer.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index 4cb850d..bbe6d43 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1386,9 +1386,10 @@ unsigned long get_next_timer_interrupt(unsigned long now)
/*
* On PREEMPT_RT we cannot sleep here. If the trylock does not
* succeed then we return the worst-case 'expires in 1 tick'
- * value:
+ * value. We use the rt functions here directly to avoid a
+ * migrate_disable() call.
*/
- if (!spin_trylock(&base->lock))
+ if (!spin_do_trylock(&base->lock))
return now + 1;
#else
spin_lock(&base->lock);
@@ -1398,7 +1399,11 @@ unsigned long get_next_timer_interrupt(unsigned long now)
base->next_timer = __next_timer_interrupt(base);
expires = base->next_timer;
}
+#ifdef CONFIG_PREEMPT_RT_FULL
+ rt_spin_unlock(&base->lock);
+#else
spin_unlock(&base->lock);
+#endif
if (time_before_eq(expires, now))
return now;