ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-sparc64 / bug.h
1 /* $Id$ */
2
3 #ifndef _SPARC64_BUG_H
4 #define _SPARC64_BUG_H
5
6 #ifdef CONFIG_DEBUG_BUGVERBOSE
7 extern void do_BUG(const char *file, int line);
8 #define BUG() do {                                      \
9         do_BUG(__FILE__, __LINE__);                     \
10         __builtin_trap();                               \
11 } while (0)
12 #else
13 #define BUG()           __builtin_trap()
14 #endif
15
16 #define BUG_ON(condition) do { \
17         if (unlikely((condition)!=0)) \
18                 BUG(); \
19 } while(0)
20
21 #define PAGE_BUG(page) do { \
22         BUG(); \
23 } while (0)
24
25 #define WARN_ON(condition) do { \
26         if (unlikely((condition)!=0)) { \
27                 printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
28                 dump_stack(); \
29         } \
30 } while (0)
31
32 #endif