Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _ASMARM_BUG_H |
| 2 | #define _ASMARM_BUG_H |
| 3 | |
| 4 | #include <linux/config.h> |
Nicolas Pitre | ff10952 | 2006-05-05 15:11:14 +0100 | [diff] [blame] | 5 | #include <linux/stddef.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | |
Matt Mackall | c8538a7 | 2005-05-01 08:59:01 -0700 | [diff] [blame] | 7 | #ifdef CONFIG_BUG |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
Al Viro | 3321565 | 2005-08-23 22:47:52 +0100 | [diff] [blame] | 9 | extern void __bug(const char *file, int line, void *data) __attribute__((noreturn)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | |
| 11 | /* give file/line information */ |
| 12 | #define BUG() __bug(__FILE__, __LINE__, NULL) |
| 13 | |
| 14 | #else |
| 15 | |
| 16 | /* this just causes an oops */ |
| 17 | #define BUG() (*(int *)0 = 0) |
| 18 | |
| 19 | #endif |
| 20 | |
| 21 | #define HAVE_ARCH_BUG |
Matt Mackall | c8538a7 | 2005-05-01 08:59:01 -0700 | [diff] [blame] | 22 | #endif |
| 23 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | #include <asm-generic/bug.h> |
| 25 | |
| 26 | #endif |