[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1240278460.27360.8.camel@falcon>
Date: Tue, 21 Apr 2009 09:47:40 +0800
From: Wu Zhangjin <wuzhangjin@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
rt-users <linux-rt-users@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>,
Steven Rostedt <rostedt@...dmis.org>,
Peter Zijlstra <peterz@...radead.org>,
Carsten Emde <ce@...g.ch>,
Clark Williams <williams@...hat.com>,
Frank Rowand <frank.rowand@...sony.com>,
Robin Gareus <robin@...eus.org>,
Gregory Haskins <ghaskins@...ell.com>,
Philippe Reynes <philippe.reynes@...smpp.fr>,
Fernando Lopez-Lezcano <nando@...ma.Stanford.EDU>,
Will Schmidt <will_schmidt@...t.ibm.com>,
Darren Hart <dvhltc@...ibm.com>, Jan Blunck <jblunck@...e.de>,
Sven-Thorsten Dietrich <sdietrich@...ell.com>
Subject: [BUG] 2.6.29.1-rt8, undefined reference to hrtimer_wait_for_timer
when using patch-2.6.29.1-rt8 with CONFIG_PREEMPT_SOFTIRQS=y, but not
enable PREEMPT_RT, there will be an error when linking kernel:
undefined reference to hrtimer_wait_for_timer
I found that, hrtimer_wait_for_timer is only defined when PREEMPT_RT is
enabled, but in include/linux/hrtimer.h, the source code is like this:
#ifdef CONFIG_PREEMPT_SOFTIRQS
extern void hrtimer_wait_for_timer(const struct hrtimer *timer);
#else
# define hrtimer_wait_for_timer(timer) do { cpu_relax(); } while (0)
a possible fix should be:
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 8bafa35..1c1cdf3 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -366,7 +366,7 @@ static inline int hrtimer_restart(struct hrtimer
*timer)
}
/* Softirq preemption could deadlock timer removal */
-#ifdef CONFIG_PREEMPT_SOFTIRQS
+#if defined(CONFIG_PREEMPT_SOFTIRQS) && defined(CONFIG_PREEMPT_RT)
extern void hrtimer_wait_for_timer(const struct hrtimer *timer);
#else
# define hrtimer_wait_for_timer(timer) do { cpu_relax(); } while (0)
--
Wu Zhangjin
DSLab, Lanzhou University, China
www.lemote.com, Jiangsu Province, China
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists