| Akinobu Mita | 6a11f75 | 2009-03-31 15:23:17 -0700 | [diff] [blame] | 1 | #ifndef LINUX_PAGE_DEBUG_FLAGS_H | 
 | 2 | #define  LINUX_PAGE_DEBUG_FLAGS_H | 
 | 3 |  | 
 | 4 | /* | 
 | 5 |  * page->debug_flags bits: | 
 | 6 |  * | 
 | 7 |  * PAGE_DEBUG_FLAG_POISON is set for poisoned pages. This is used to | 
 | 8 |  * implement generic debug pagealloc feature. The pages are filled with | 
 | 9 |  * poison patterns and set this flag after free_pages(). The poisoned | 
 | 10 |  * pages are verified whether the patterns are not corrupted and clear | 
 | 11 |  * the flag before alloc_pages(). | 
 | 12 |  */ | 
 | 13 |  | 
 | 14 | enum page_debug_flags { | 
 | 15 | 	PAGE_DEBUG_FLAG_POISON,		/* Page is poisoned */ | 
| Stanislaw Gruszka | c0a32fc | 2012-01-10 15:07:28 -0800 | [diff] [blame] | 16 | 	PAGE_DEBUG_FLAG_GUARD, | 
| Akinobu Mita | 6a11f75 | 2009-03-31 15:23:17 -0700 | [diff] [blame] | 17 | }; | 
 | 18 |  | 
 | 19 | /* | 
 | 20 |  * Ensure that CONFIG_WANT_PAGE_DEBUG_FLAGS reliably | 
 | 21 |  * gets turned off when no debug features are enabling it! | 
 | 22 |  */ | 
 | 23 |  | 
 | 24 | #ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS | 
| Stanislaw Gruszka | c0a32fc | 2012-01-10 15:07:28 -0800 | [diff] [blame] | 25 | #if !defined(CONFIG_PAGE_POISONING) && \ | 
 | 26 |     !defined(CONFIG_PAGE_GUARD) \ | 
| Akinobu Mita | 6a11f75 | 2009-03-31 15:23:17 -0700 | [diff] [blame] | 27 | /* && !defined(CONFIG_PAGE_DEBUG_SOMETHING_ELSE) && ... */ | 
 | 28 | #error WANT_PAGE_DEBUG_FLAGS is turned on with no debug features! | 
 | 29 | #endif | 
 | 30 | #endif /* CONFIG_WANT_PAGE_DEBUG_FLAGS */ | 
 | 31 |  | 
 | 32 | #endif /* LINUX_PAGE_DEBUG_FLAGS_H */ |