38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
From: Ingo Molnar <mingo@elte.hu>
|
|
Date: Fri, 3 Jul 2009 08:29:58 -0500
|
|
Subject: bug: BUG_ON/WARN_ON variants dependend on RT/!RT
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.10/patches-3.10.4-rt1.tar.xz
|
|
|
|
Signed-off-by: Ingo Molnar <mingo@elte.hu>
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
|
|
---
|
|
include/asm-generic/bug.h | 14 ++++++++++++++
|
|
1 file changed, 14 insertions(+)
|
|
|
|
Index: linux-stable/include/asm-generic/bug.h
|
|
===================================================================
|
|
--- linux-stable.orig/include/asm-generic/bug.h
|
|
+++ linux-stable/include/asm-generic/bug.h
|
|
@@ -202,6 +202,20 @@ extern void warn_slowpath_null(const cha
|
|
# define WARN_ON_SMP(x) ({0;})
|
|
#endif
|
|
|
|
+#ifdef CONFIG_PREEMPT_RT_BASE
|
|
+# define BUG_ON_RT(c) BUG_ON(c)
|
|
+# define BUG_ON_NONRT(c) do { } while (0)
|
|
+# define WARN_ON_RT(condition) WARN_ON(condition)
|
|
+# define WARN_ON_NONRT(condition) do { } while (0)
|
|
+# define WARN_ON_ONCE_NONRT(condition) do { } while (0)
|
|
+#else
|
|
+# define BUG_ON_RT(c) do { } while (0)
|
|
+# define BUG_ON_NONRT(c) BUG_ON(c)
|
|
+# define WARN_ON_RT(condition) do { } while (0)
|
|
+# define WARN_ON_NONRT(condition) WARN_ON(condition)
|
|
+# define WARN_ON_ONCE_NONRT(condition) WARN_ON_ONCE(condition)
|
|
+#endif
|
|
+
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
#endif
|