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.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index c92ae0f166ff..a06eecd48292 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -4,6 +4,22 @@
4#include <linux/compiler.h> 4#include <linux/compiler.h>
5 5
6#ifdef CONFIG_BUG 6#ifdef CONFIG_BUG
7
8#ifdef CONFIG_GENERIC_BUG
9#ifndef __ASSEMBLY__
10struct bug_entry {
11 unsigned long bug_addr;
12#ifdef CONFIG_DEBUG_BUGVERBOSE
13 const char *file;
14 unsigned short line;
15#endif
16 unsigned short flags;
17};
18#endif /* __ASSEMBLY__ */
19
20#define BUGFLAG_WARNING (1<<0)
21#endif /* CONFIG_GENERIC_BUG */
22
7#ifndef HAVE_ARCH_BUG 23#ifndef HAVE_ARCH_BUG
8#define BUG() do { \ 24#define BUG() do { \
9 printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \ 25 printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
@@ -19,7 +35,7 @@
19#define WARN_ON(condition) ({ \ 35#define WARN_ON(condition) ({ \
20 typeof(condition) __ret_warn_on = (condition); \ 36 typeof(condition) __ret_warn_on = (condition); \
21 if (unlikely(__ret_warn_on)) { \ 37 if (unlikely(__ret_warn_on)) { \
22 printk("BUG: warning at %s:%d/%s()\n", __FILE__, \ 38 printk("WARNING at %s:%d %s()\n", __FILE__, \
23 __LINE__, __FUNCTION__); \ 39 __LINE__, __FUNCTION__); \
24 dump_stack(); \ 40 dump_stack(); \
25 } \ 41 } \