diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mm.h | 7 | ||||
-rw-r--r-- | include/linux/mmdebug.h | 18 |
2 files changed, 19 insertions, 6 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 586a943cab0..3414a8813e9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/gfp.h> | 8 | #include <linux/gfp.h> |
9 | #include <linux/list.h> | 9 | #include <linux/list.h> |
10 | #include <linux/mmdebug.h> | ||
10 | #include <linux/mmzone.h> | 11 | #include <linux/mmzone.h> |
11 | #include <linux/rbtree.h> | 12 | #include <linux/rbtree.h> |
12 | #include <linux/prio_tree.h> | 13 | #include <linux/prio_tree.h> |
@@ -210,12 +211,6 @@ struct inode; | |||
210 | */ | 211 | */ |
211 | #include <linux/page-flags.h> | 212 | #include <linux/page-flags.h> |
212 | 213 | ||
213 | #ifdef CONFIG_DEBUG_VM | ||
214 | #define VM_BUG_ON(cond) BUG_ON(cond) | ||
215 | #else | ||
216 | #define VM_BUG_ON(condition) do { } while(0) | ||
217 | #endif | ||
218 | |||
219 | /* | 214 | /* |
220 | * Methods to modify the page usage count. | 215 | * Methods to modify the page usage count. |
221 | * | 216 | * |
diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h new file mode 100644 index 00000000000..860ed1a71bb --- /dev/null +++ b/include/linux/mmdebug.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef LINUX_MM_DEBUG_H | ||
2 | #define LINUX_MM_DEBUG_H 1 | ||
3 | |||
4 | #include <linux/autoconf.h> | ||
5 | |||
6 | #ifdef CONFIG_DEBUG_VM | ||
7 | #define VM_BUG_ON(cond) BUG_ON(cond) | ||
8 | #else | ||
9 | #define VM_BUG_ON(cond) do { } while(0) | ||
10 | #endif | ||
11 | |||
12 | #ifdef CONFIG_DEBUG_VIRTUAL | ||
13 | #define VIRTUAL_BUG_ON(cond) BUG_ON(cond) | ||
14 | #else | ||
15 | #define VIRTUAL_BUG_ON(cond) do { } while(0) | ||
16 | #endif | ||
17 | |||
18 | #endif | ||