Merge with 2.5.75.
[linux-2.6/linux-mips.git] / include / asm-arm26 / bug.h
bloba1afde728b034262e6841831159d5dddac362a61
1 #ifndef _ASMARM_BUG_H
2 #define _ASMARM_BUG_H
4 #include <linux/config.h>
6 #ifdef CONFIG_DEBUG_BUGVERBOSE
7 extern volatile void __bug(const char *file, int line, void *data);
9 /* give file/line information */
10 #define BUG() __bug(__FILE__, __LINE__, NULL)
11 #define PAGE_BUG(page) __bug(__FILE__, __LINE__, page)
13 #else
15 /* these just cause an oops */
16 #define BUG() (*(int *)0 = 0)
17 #define PAGE_BUG(page) (*(int *)0 = 0)
19 #endif
21 #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
23 #define WARN_ON(condition) do { \
24 if (unlikely((condition)!=0)) { \
25 printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
26 dump_stack(); \
27 } \
28 } while (0)
30 #endif