Merge tag 'blackfin-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/realm...
[deliverable/linux.git] / include / linux / mmdebug.h
CommitLineData
59ea7463
JS
1#ifndef LINUX_MM_DEBUG_H
2#define LINUX_MM_DEBUG_H 1
3
309381fe
SL
4struct page;
5
d230dec1
KS
6extern void dump_page(struct page *page, const char *reason);
7extern void dump_page_badflags(struct page *page, const char *reason,
309381fe
SL
8 unsigned long badflags);
9
59ea7463
JS
10#ifdef CONFIG_DEBUG_VM
11#define VM_BUG_ON(cond) BUG_ON(cond)
309381fe
SL
12#define VM_BUG_ON_PAGE(cond, page) \
13 do { if (unlikely(cond)) { dump_page(page, NULL); BUG(); } } while (0)
59ea7463 14#else
02602a18 15#define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
309381fe 16#define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
59ea7463
JS
17#endif
18
19#ifdef CONFIG_DEBUG_VIRTUAL
20#define VIRTUAL_BUG_ON(cond) BUG_ON(cond)
21#else
7aa413de 22#define VIRTUAL_BUG_ON(cond) do { } while (0)
59ea7463
JS
23#endif
24
25#endif
This page took 0.61078 seconds and 5 git commands to generate.