linux/debian/patches/features/all/rt/timer.c-fix-build-fail-for-...

46 lines
1.3 KiB
Diff
Raw Normal View History

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>
diff --git a/kernel/timer.c b/kernel/timer.c
index 00f1d4f..e81d197 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1404,7 +1404,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;
--
1.7.0.4