47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
From 1f9b191467b70ed79480294395ad99145fea1b5a Mon Sep 17 00:00:00 2001
|
||
From: Paul Gortmaker <paul.gortmaker@windriver.com>
|
||
Date: Tue, 9 Oct 2012 20:20:10 -0400
|
||
Subject: [PATCH] timer.c: fix build fail for ! RT_FULL
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
The patch "timer-handle-idle-trylock-in-get-next-timer-irq.patch"
|
||
introduces a use of rt_spin_unlock outside of the RT_FULL, but
|
||
since we have:
|
||
|
||
#ifdef CONFIG_PREEMPT_RT_FULL
|
||
# include <linux/spinlock_rt.h>
|
||
#else /* PREEMPT_RT_FULL */
|
||
|
||
we will not get the definition for !RT_FULL and instead see:
|
||
|
||
kernel/timer.c: In function ‘get_next_timer_interrupt’:
|
||
kernel/timer.c:1407: error: implicit declaration of function ‘rt_spin_unlock’
|
||
make[2]: *** [kernel/timer.o] Error 1
|
||
|
||
Extend the ifdef usage to cover the unlock case too.
|
||
|
||
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
||
|
||
---
|
||
kernel/timer.c | 4 ++++
|
||
1 file changed, 4 insertions(+)
|
||
|
||
Index: linux-stable/kernel/timer.c
|
||
===================================================================
|
||
--- linux-stable.orig/kernel/timer.c
|
||
+++ linux-stable/kernel/timer.c
|
||
@@ -1406,7 +1406,11 @@ unsigned long get_next_timer_interrupt(u
|
||
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;
|