diff options
Diffstat (limited to 'include/asm-generic/bug.h')
-rw-r--r-- | include/asm-generic/bug.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index e5913c3b715a..6e5aaaa9a2fb 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/config.h> | 5 | #include <linux/config.h> |
6 | 6 | ||
7 | #ifdef CONFIG_BUG | ||
7 | #ifndef HAVE_ARCH_BUG | 8 | #ifndef HAVE_ARCH_BUG |
8 | #define BUG() do { \ | 9 | #define BUG() do { \ |
9 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 10 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ |
@@ -31,4 +32,22 @@ | |||
31 | } while (0) | 32 | } while (0) |
32 | #endif | 33 | #endif |
33 | 34 | ||
35 | #else /* !CONFIG_BUG */ | ||
36 | #ifndef HAVE_ARCH_BUG | ||
37 | #define BUG() | ||
38 | #endif | ||
39 | |||
40 | #ifndef HAVE_ARCH_PAGE_BUG | ||
41 | #define PAGE_BUG(page) do { if (page) ; } while (0) | ||
42 | #endif | ||
43 | |||
44 | #ifndef HAVE_ARCH_BUG_ON | ||
45 | #define BUG_ON(condition) do { if (condition) ; } while(0) | ||
46 | #endif | ||
47 | |||
48 | #ifndef HAVE_ARCH_WARN_ON | ||
49 | #define WARN_ON(condition) do { if (condition) ; } while(0) | ||
50 | #endif | ||
51 | #endif | ||
52 | |||
34 | #endif | 53 | #endif |