aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/page-flags.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/linux/page-flags.h
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r--include/linux/page-flags.h58
1 files changed, 1 insertions, 57 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 70473da47b3..e90a673be67 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -6,8 +6,6 @@
6#define PAGE_FLAGS_H 6#define PAGE_FLAGS_H
7 7
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/bug.h>
10#include <linux/mmdebug.h>
11#ifndef __GENERATING_BOUNDS_H 9#ifndef __GENERATING_BOUNDS_H
12#include <linux/mm_types.h> 10#include <linux/mm_types.h>
13#include <generated/bounds.h> 11#include <generated/bounds.h>
@@ -362,7 +360,7 @@ static inline void ClearPageCompound(struct page *page)
362 * pages on the LRU and/or pagecache. 360 * pages on the LRU and/or pagecache.
363 */ 361 */
364TESTPAGEFLAG(Compound, compound) 362TESTPAGEFLAG(Compound, compound)
365__SETPAGEFLAG(Head, compound) __CLEARPAGEFLAG(Head, compound) 363__PAGEFLAG(Head, compound)
366 364
367/* 365/*
368 * PG_reclaim is used in combination with PG_compound to mark the 366 * PG_reclaim is used in combination with PG_compound to mark the
@@ -374,14 +372,8 @@ __SETPAGEFLAG(Head, compound) __CLEARPAGEFLAG(Head, compound)
374 * PG_compound & PG_reclaim => Tail page 372 * PG_compound & PG_reclaim => Tail page
375 * PG_compound & ~PG_reclaim => Head page 373 * PG_compound & ~PG_reclaim => Head page
376 */ 374 */
377#define PG_head_mask ((1L << PG_compound))
378#define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim)) 375#define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim))
379 376
380static inline int PageHead(struct page *page)
381{
382 return ((page->flags & PG_head_tail_mask) == PG_head_mask);
383}
384
385static inline int PageTail(struct page *page) 377static inline int PageTail(struct page *page)
386{ 378{
387 return ((page->flags & PG_head_tail_mask) == PG_head_tail_mask); 379 return ((page->flags & PG_head_tail_mask) == PG_head_tail_mask);
@@ -422,26 +414,11 @@ static inline int PageTransHuge(struct page *page)
422 return PageHead(page); 414 return PageHead(page);
423} 415}
424 416
425/*
426 * PageTransCompound returns true for both transparent huge pages
427 * and hugetlbfs pages, so it should only be called when it's known
428 * that hugetlbfs pages aren't involved.
429 */
430static inline int PageTransCompound(struct page *page) 417static inline int PageTransCompound(struct page *page)
431{ 418{
432 return PageCompound(page); 419 return PageCompound(page);
433} 420}
434 421
435/*
436 * PageTransTail returns true for both transparent huge pages
437 * and hugetlbfs pages, so it should only be called when it's known
438 * that hugetlbfs pages aren't involved.
439 */
440static inline int PageTransTail(struct page *page)
441{
442 return PageTail(page);
443}
444
445#else 422#else
446 423
447static inline int PageTransHuge(struct page *page) 424static inline int PageTransHuge(struct page *page)
@@ -453,41 +430,8 @@ static inline int PageTransCompound(struct page *page)
453{ 430{
454 return 0; 431 return 0;
455} 432}
456
457static inline int PageTransTail(struct page *page)
458{
459 return 0;
460}
461#endif 433#endif
462 434
463/*
464 * If network-based swap is enabled, sl*b must keep track of whether pages
465 * were allocated from pfmemalloc reserves.
466 */
467static inline int PageSlabPfmemalloc(struct page *page)
468{
469 VM_BUG_ON(!PageSlab(page));
470 return PageActive(page);
471}
472
473static inline void SetPageSlabPfmemalloc(struct page *page)
474{
475 VM_BUG_ON(!PageSlab(page));
476 SetPageActive(page);
477}
478
479static inline void __ClearPageSlabPfmemalloc(struct page *page)
480{
481 VM_BUG_ON(!PageSlab(page));
482 __ClearPageActive(page);
483}
484
485static inline void ClearPageSlabPfmemalloc(struct page *page)
486{
487 VM_BUG_ON(!PageSlab(page));
488 ClearPageActive(page);
489}
490
491#ifdef CONFIG_MMU 435#ifdef CONFIG_MMU
492#define __PG_MLOCKED (1 << PG_mlocked) 436#define __PG_MLOCKED (1 << PG_mlocked)
493#else 437#else