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>
This commit is contained in:
committed by
Linus Torvalds
parent
53f79acb6e
commit
af8e3354b4
@ -99,7 +99,7 @@ enum pageflags {
|
||||
PG_buddy, /* Page is free, on buddy lists */
|
||||
PG_swapbacked, /* Page is backed by RAM/swap */
|
||||
PG_unevictable, /* Page is "unevictable" */
|
||||
#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
|
||||
#ifdef CONFIG_MMU
|
||||
PG_mlocked, /* Page is vma mlocked */
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_USES_PG_UNCACHED
|
||||
@ -259,12 +259,10 @@ PAGEFLAG_FALSE(SwapCache)
|
||||
PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable)
|
||||
TESTCLEARFLAG(Unevictable, unevictable)
|
||||
|
||||
#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
|
||||
#define MLOCK_PAGES 1
|
||||
#ifdef CONFIG_MMU
|
||||
PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked)
|
||||
TESTSCFLAG(Mlocked, mlocked) __TESTCLEARFLAG(Mlocked, mlocked)
|
||||
#else
|
||||
#define MLOCK_PAGES 0
|
||||
PAGEFLAG_FALSE(Mlocked) SETPAGEFLAG_NOOP(Mlocked)
|
||||
TESTCLEARFLAG_FALSE(Mlocked) __TESTCLEARFLAG_FALSE(Mlocked)
|
||||
#endif
|
||||
@ -393,7 +391,7 @@ static inline void __ClearPageTail(struct page *page)
|
||||
|
||||
#endif /* !PAGEFLAGS_EXTENDED */
|
||||
|
||||
#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
|
||||
#ifdef CONFIG_MMU
|
||||
#define __PG_MLOCKED (1 << PG_mlocked)
|
||||
#else
|
||||
#define __PG_MLOCKED 0
|
||||
|
Reference in New Issue
Block a user