diff options
author | Hugh Dickins <hugh.dickins@tiscali.co.uk> | 2009-12-14 20:58:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-15 11:53:17 -0500 |
commit | af8e3354b4bbd1ee5a3a55d11a5e1fe37e77f0ba (patch) | |
tree | 8dc0ece80878d00409d4662c5fd1e28cd7fbbdd8 /include/linux/page-flags.h | |
parent | 53f79acb6ecb648afd63e0f13deba167f1a934df (diff) |
mm: CONFIG_MMU for PG_mlocked
Remove three degrees of obfuscation, left over from when we had
CONFIG_UNEVICTABLE_LRU. MLOCK_PAGES is CONFIG_HAVE_MLOCKED_PAGE_BIT is
CONFIG_HAVE_MLOCK is CONFIG_MMU. rmap.o (and memory-failure.o) are only
built when CONFIG_MMU, so don't need such conditions at all.
Somehow, I feel no compulsion to remove the CONFIG_HAVE_MLOCK* lines from
169 defconfigs: leave those to evolve in due course.
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Izik Eidus <ieidus@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Nick Piggin <npiggin@suse.de>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r-- | include/linux/page-flags.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 6b202b173955..49e907bd067f 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -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 |
@@ -393,7 +391,7 @@ static inline void __ClearPageTail(struct page *page) | |||
393 | 391 | ||
394 | #endif /* !PAGEFLAGS_EXTENDED */ | 392 | #endif /* !PAGEFLAGS_EXTENDED */ |
395 | 393 | ||
396 | #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT | 394 | #ifdef CONFIG_MMU |
397 | #define __PG_MLOCKED (1 << PG_mlocked) | 395 | #define __PG_MLOCKED (1 << PG_mlocked) |
398 | #else | 396 | #else |
399 | #define __PG_MLOCKED 0 | 397 | #define __PG_MLOCKED 0 |