summaryrefslogtreecommitdiff
path: root/kernel/timer.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-17 22:08:38 +0200
committerClark Williams <williams@redhat.com>2012-04-04 09:14:49 -0500
commit6fd5becabcf9b8e1a47ea4e1e2fb4c7f97a3c8df (patch)
tree614f6d76040797a7d105af413a11949ab9a79381 /kernel/timer.c
parentc21071ccf7a30b829f95f6b227b6718910359dc9 (diff)
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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index 8a9ca7d1a23c..7ea787b23d76 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1323,13 +1323,14 @@ 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)) {
if (time_before_eq(base->next_timer, base->timer_jiffies))
base->next_timer = __next_timer_interrupt(base);
expires = base->next_timer;
- spin_unlock(&base->lock);
+ rt_spin_unlock(&base->lock);
} else {
expires = now + 1;
}