aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-03-31 18:23:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 11:59:14 -0400
commit33925b25d2c00a29664f1994ab350a9bff70f7a2 (patch)
treefe1a0ef5cceba27664eae8f38f9e4e2a27bf1b36 /include
parent7ca43e7564679604d86e9ed834e7bbcffd8a4a3f (diff)
nommu: there is no mlock() for NOMMU, so don't provide the bits
The mlock() facility does not exist for NOMMU since all mappings are effectively locked anyway, so we don't make the bits available when they're not useful. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Greg Ungerer <gerg@snapgear.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Rik van Riel <riel@redhat.com> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: Enrik Berkhan <Enrik.Berkhan@ge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/page-flags.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 219a523ecdb..61df1779b2a 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -96,6 +96,8 @@ enum pageflags {
96 PG_swapbacked, /* Page is backed by RAM/swap */ 96 PG_swapbacked, /* Page is backed by RAM/swap */
97#ifdef CONFIG_UNEVICTABLE_LRU 97#ifdef CONFIG_UNEVICTABLE_LRU
98 PG_unevictable, /* Page is "unevictable" */ 98 PG_unevictable, /* Page is "unevictable" */
99#endif
100#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
99 PG_mlocked, /* Page is vma mlocked */ 101 PG_mlocked, /* Page is vma mlocked */
100#endif 102#endif
101#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR 103#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
@@ -234,20 +236,20 @@ PAGEFLAG_FALSE(SwapCache)
234#ifdef CONFIG_UNEVICTABLE_LRU 236#ifdef CONFIG_UNEVICTABLE_LRU
235PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) 237PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable)
236 TESTCLEARFLAG(Unevictable, unevictable) 238 TESTCLEARFLAG(Unevictable, unevictable)
239#else
240PAGEFLAG_FALSE(Unevictable) TESTCLEARFLAG_FALSE(Unevictable)
241 SETPAGEFLAG_NOOP(Unevictable) CLEARPAGEFLAG_NOOP(Unevictable)
242 __CLEARPAGEFLAG_NOOP(Unevictable)
243#endif
237 244
245#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
238#define MLOCK_PAGES 1 246#define MLOCK_PAGES 1
239PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked) 247PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked)
240 TESTSCFLAG(Mlocked, mlocked) 248 TESTSCFLAG(Mlocked, mlocked)
241
242#else 249#else
243
244#define MLOCK_PAGES 0 250#define MLOCK_PAGES 0
245PAGEFLAG_FALSE(Mlocked) 251PAGEFLAG_FALSE(Mlocked)
246 SETPAGEFLAG_NOOP(Mlocked) TESTCLEARFLAG_FALSE(Mlocked) 252 SETPAGEFLAG_NOOP(Mlocked) TESTCLEARFLAG_FALSE(Mlocked)
247
248PAGEFLAG_FALSE(Unevictable) TESTCLEARFLAG_FALSE(Unevictable)
249 SETPAGEFLAG_NOOP(Unevictable) CLEARPAGEFLAG_NOOP(Unevictable)
250 __CLEARPAGEFLAG_NOOP(Unevictable)
251#endif 253#endif
252 254
253#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR 255#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
@@ -367,9 +369,13 @@ static inline void __ClearPageTail(struct page *page)
367 369
368#ifdef CONFIG_UNEVICTABLE_LRU 370#ifdef CONFIG_UNEVICTABLE_LRU
369#define __PG_UNEVICTABLE (1 << PG_unevictable) 371#define __PG_UNEVICTABLE (1 << PG_unevictable)
370#define __PG_MLOCKED (1 << PG_mlocked)
371#else 372#else
372#define __PG_UNEVICTABLE 0 373#define __PG_UNEVICTABLE 0
374#endif
375
376#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
377#define __PG_MLOCKED (1 << PG_mlocked)
378#else
373#define __PG_MLOCKED 0 379#define __PG_MLOCKED 0
374#endif 380#endif
375 381