aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/bug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/bug.h')
-rw-r--r--include/asm-generic/bug.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 2520a6e241dc..7d10f962aa13 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -3,10 +3,18 @@
3 3
4#include <linux/compiler.h> 4#include <linux/compiler.h>
5 5
6#ifdef CONFIG_GENERIC_BUG
7#define BUGFLAG_WARNING (1 << 0)
8#define BUGFLAG_TAINT(taint) (BUGFLAG_WARNING | ((taint) << 8))
9#define BUG_GET_TAINT(bug) ((bug)->flags >> 8)
10#endif
11
12#ifndef __ASSEMBLY__
13#include <linux/kernel.h>
14
6#ifdef CONFIG_BUG 15#ifdef CONFIG_BUG
7 16
8#ifdef CONFIG_GENERIC_BUG 17#ifdef CONFIG_GENERIC_BUG
9#ifndef __ASSEMBLY__
10struct bug_entry { 18struct bug_entry {
11#ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS 19#ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
12 unsigned long bug_addr; 20 unsigned long bug_addr;
@@ -23,12 +31,6 @@ struct bug_entry {
23#endif 31#endif
24 unsigned short flags; 32 unsigned short flags;
25}; 33};
26#endif /* __ASSEMBLY__ */
27
28#define BUGFLAG_WARNING (1 << 0)
29#define BUGFLAG_TAINT(taint) (BUGFLAG_WARNING | ((taint) << 8))
30#define BUG_GET_TAINT(bug) ((bug)->flags >> 8)
31
32#endif /* CONFIG_GENERIC_BUG */ 34#endif /* CONFIG_GENERIC_BUG */
33 35
34/* 36/*
@@ -60,7 +62,6 @@ struct bug_entry {
60 * to provide better diagnostics. 62 * to provide better diagnostics.
61 */ 63 */
62#ifndef __WARN_TAINT 64#ifndef __WARN_TAINT
63#ifndef __ASSEMBLY__
64extern __printf(3, 4) 65extern __printf(3, 4)
65void warn_slowpath_fmt(const char *file, const int line, 66void warn_slowpath_fmt(const char *file, const int line,
66 const char *fmt, ...); 67 const char *fmt, ...);
@@ -69,7 +70,6 @@ void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint,
69 const char *fmt, ...); 70 const char *fmt, ...);
70extern void warn_slowpath_null(const char *file, const int line); 71extern void warn_slowpath_null(const char *file, const int line);
71#define WANT_WARN_ON_SLOWPATH 72#define WANT_WARN_ON_SLOWPATH
72#endif
73#define __WARN() warn_slowpath_null(__FILE__, __LINE__) 73#define __WARN() warn_slowpath_null(__FILE__, __LINE__)
74#define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg) 74#define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg)
75#define __WARN_printf_taint(taint, arg...) \ 75#define __WARN_printf_taint(taint, arg...) \
@@ -202,4 +202,6 @@ extern void warn_slowpath_null(const char *file, const int line);
202# define WARN_ON_SMP(x) ({0;}) 202# define WARN_ON_SMP(x) ({0;})
203#endif 203#endif
204 204
205#endif /* __ASSEMBLY__ */
206
205#endif 207#endif