summaryrefslogtreecommitdiff
path: root/kernel/timer.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2014-05-02 19:31:50 (GMT)
committerScott Wood <scottwood@freescale.com>2015-02-13 22:21:15 (GMT)
commitd53155f8296e7dd3c548c783b1f91558cb392bfe (patch)
tree31f8799b256d78edef3ae9425a73bdd87439f88d /kernel/timer.c
parent5b95042d47984fc3ebb3f682b5ba82915153231b (diff)
downloadlinux-fsl-qoriq-d53155f8296e7dd3c548c783b1f91558cb392bfe.tar.xz
timer: do not spin_trylock() on UP
This will void a warning comming from the spin-lock debugging code. The lock avoiding idea is from Steven Rostedt. Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/timer.c')
-rw-r--r--kernel/timer.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index 611a597..3b79da2 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1461,6 +1461,19 @@ void run_local_timers(void)
* the timer softirq.
*/
#ifdef CONFIG_PREEMPT_RT_FULL
+
+#ifndef CONFIG_SMP
+ /*
+ * The spin_do_trylock() later may fail as the lock may be hold before
+ * the interrupt arrived. The spin-lock debugging code will raise a
+ * warning if the try_lock fails on UP. Since this is only an
+ * optimization for the FULL_NO_HZ case (not to run the timer softirq on
+ * an nohz_full CPU) we don't really care and shedule the softirq.
+ */
+ raise_softirq(TIMER_SOFTIRQ);
+ return;
+#endif
+
/* On RT, irq work runs from softirq */
if (irq_work_needs_cpu()) {
raise_softirq(TIMER_SOFTIRQ);