diff options
Diffstat (limited to 'include/linux/page-flags.h')
| -rw-r--r-- | include/linux/page-flags.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 6b202b173955..5b59f35dcb8f 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
| 9 | #ifndef __GENERATING_BOUNDS_H | 9 | #ifndef __GENERATING_BOUNDS_H |
| 10 | #include <linux/mm_types.h> | 10 | #include <linux/mm_types.h> |
| 11 | #include <linux/bounds.h> | 11 | #include <generated/bounds.h> |
| 12 | #endif /* !__GENERATING_BOUNDS_H */ | 12 | #endif /* !__GENERATING_BOUNDS_H */ |
| 13 | 13 | ||
| 14 | /* | 14 | /* |
| @@ -99,7 +99,7 @@ enum pageflags { | |||
| 99 | PG_buddy, /* Page is free, on buddy lists */ | 99 | PG_buddy, /* Page is free, on buddy lists */ |
| 100 | PG_swapbacked, /* Page is backed by RAM/swap */ | 100 | PG_swapbacked, /* Page is backed by RAM/swap */ |
| 101 | PG_unevictable, /* Page is "unevictable" */ | 101 | PG_unevictable, /* Page is "unevictable" */ |
| 102 | #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT | 102 | #ifdef CONFIG_MMU |
| 103 | PG_mlocked, /* Page is vma mlocked */ | 103 | PG_mlocked, /* Page is vma mlocked */ |
| 104 | #endif | 104 | #endif |
| 105 | #ifdef CONFIG_ARCH_USES_PG_UNCACHED | 105 | #ifdef CONFIG_ARCH_USES_PG_UNCACHED |
| @@ -259,12 +259,10 @@ PAGEFLAG_FALSE(SwapCache) | |||
| 259 | PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) | 259 | PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) |
| 260 | TESTCLEARFLAG(Unevictable, unevictable) | 260 | TESTCLEARFLAG(Unevictable, unevictable) |
| 261 | 261 | ||
| 262 | #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT | 262 | #ifdef CONFIG_MMU |
| 263 | #define MLOCK_PAGES 1 | ||
| 264 | PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked) | 263 | PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked) |
| 265 | TESTSCFLAG(Mlocked, mlocked) __TESTCLEARFLAG(Mlocked, mlocked) | 264 | TESTSCFLAG(Mlocked, mlocked) __TESTCLEARFLAG(Mlocked, mlocked) |
| 266 | #else | 265 | #else |
| 267 | #define MLOCK_PAGES 0 | ||
| 268 | PAGEFLAG_FALSE(Mlocked) SETPAGEFLAG_NOOP(Mlocked) | 266 | PAGEFLAG_FALSE(Mlocked) SETPAGEFLAG_NOOP(Mlocked) |
| 269 | TESTCLEARFLAG_FALSE(Mlocked) __TESTCLEARFLAG_FALSE(Mlocked) | 267 | TESTCLEARFLAG_FALSE(Mlocked) __TESTCLEARFLAG_FALSE(Mlocked) |
| 270 | #endif | 268 | #endif |
| @@ -277,13 +275,15 @@ PAGEFLAG_FALSE(Uncached) | |||
| 277 | 275 | ||
| 278 | #ifdef CONFIG_MEMORY_FAILURE | 276 | #ifdef CONFIG_MEMORY_FAILURE |
| 279 | PAGEFLAG(HWPoison, hwpoison) | 277 | PAGEFLAG(HWPoison, hwpoison) |
| 280 | TESTSETFLAG(HWPoison, hwpoison) | 278 | TESTSCFLAG(HWPoison, hwpoison) |
| 281 | #define __PG_HWPOISON (1UL << PG_hwpoison) | 279 | #define __PG_HWPOISON (1UL << PG_hwpoison) |
| 282 | #else | 280 | #else |
| 283 | PAGEFLAG_FALSE(HWPoison) | 281 | PAGEFLAG_FALSE(HWPoison) |
| 284 | #define __PG_HWPOISON 0 | 282 | #define __PG_HWPOISON 0 |
| 285 | #endif | 283 | #endif |
| 286 | 284 | ||
| 285 | u64 stable_page_flags(struct page *page); | ||
| 286 | |||
| 287 | static inline int PageUptodate(struct page *page) | 287 | static inline int PageUptodate(struct page *page) |
| 288 | { | 288 | { |
| 289 | int ret = test_bit(PG_uptodate, &(page)->flags); | 289 | int ret = test_bit(PG_uptodate, &(page)->flags); |
| @@ -393,7 +393,7 @@ static inline void __ClearPageTail(struct page *page) | |||
| 393 | 393 | ||
| 394 | #endif /* !PAGEFLAGS_EXTENDED */ | 394 | #endif /* !PAGEFLAGS_EXTENDED */ |
| 395 | 395 | ||
| 396 | #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT | 396 | #ifdef CONFIG_MMU |
| 397 | #define __PG_MLOCKED (1 << PG_mlocked) | 397 | #define __PG_MLOCKED (1 << PG_mlocked) |
| 398 | #else | 398 | #else |
| 399 | #define __PG_MLOCKED 0 | 399 | #define __PG_MLOCKED 0 |
