1 From e52e09be77de68a0380f9aabb8f0c40fa20c4ded Mon Sep 17 00:00:00 2001
2 From: Ingo Molnar <mingo@elte.hu>
3 Date: Fri, 3 Jul 2009 08:29:58 -0500
4 Subject: [PATCH 034/365] bug: BUG_ON/WARN_ON variants dependend on RT/!RT
6 Introduce RT/NON-RT WARN/BUG statements to avoid ifdefs in the code.
8 Signed-off-by: Ingo Molnar <mingo@elte.hu>
9 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
11 include/asm-generic/bug.h | 14 ++++++++++++++
12 1 file changed, 14 insertions(+)
14 diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
15 index 630dd23..850e4d9 100644
16 --- a/include/asm-generic/bug.h
17 +++ b/include/asm-generic/bug.h
18 @@ -206,6 +206,20 @@ extern void warn_slowpath_null(const char *file, const int line);
19 # define WARN_ON_SMP(x) ({0;})
22 +#ifdef CONFIG_PREEMPT_RT_BASE
23 +# define BUG_ON_RT(c) BUG_ON(c)
24 +# define BUG_ON_NONRT(c) do { } while (0)
25 +# define WARN_ON_RT(condition) WARN_ON(condition)
26 +# define WARN_ON_NONRT(condition) do { } while (0)
27 +# define WARN_ON_ONCE_NONRT(condition) do { } while (0)
29 +# define BUG_ON_RT(c) do { } while (0)
30 +# define BUG_ON_NONRT(c) BUG_ON(c)
31 +# define WARN_ON_RT(condition) do { } while (0)
32 +# define WARN_ON_NONRT(condition) WARN_ON(condition)
33 +# define WARN_ON_ONCE_NONRT(condition) WARN_ON_ONCE(condition)
36 #endif /* __ASSEMBLY__ */