diff options
Diffstat (limited to 'include/asm-sh64/bug.h')
-rw-r--r-- | include/asm-sh64/bug.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/include/asm-sh64/bug.h b/include/asm-sh64/bug.h index 5d659ec28e1..f3a9c9248ef 100644 --- a/include/asm-sh64/bug.h +++ b/include/asm-sh64/bug.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef __ASM_SH64_BUG_H | 1 | #ifndef __ASM_SH64_BUG_H |
2 | #define __ASM_SH64_BUG_H | 2 | #define __ASM_SH64_BUG_H |
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #ifdef CONFIG_BUG |
5 | |||
6 | /* | 5 | /* |
7 | * Tell the user there is some problem, then force a segfault (in process | 6 | * Tell the user there is some problem, then force a segfault (in process |
8 | * context) or a panic (interrupt context). | 7 | * context) or a panic (interrupt context). |
@@ -12,17 +11,9 @@ | |||
12 | *(volatile int *)0 = 0; \ | 11 | *(volatile int *)0 = 0; \ |
13 | } while (0) | 12 | } while (0) |
14 | 13 | ||
15 | #define BUG_ON(condition) do { \ | 14 | #define HAVE_ARCH_BUG |
16 | if (unlikely((condition)!=0)) \ | 15 | #endif |
17 | BUG(); \ | ||
18 | } while(0) | ||
19 | 16 | ||
20 | #define WARN_ON(condition) do { \ | 17 | #include <asm-generic/bug.h> |
21 | if (unlikely((condition)!=0)) { \ | ||
22 | printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \ | ||
23 | dump_stack(); \ | ||
24 | } \ | ||
25 | } while (0) | ||
26 | 18 | ||
27 | #endif /* __ASM_SH64_BUG_H */ | 19 | #endif /* __ASM_SH64_BUG_H */ |
28 | |||