- patches.suse/slab-handle-memoryless-nodes-v2a.patch: Refresh.
[linux-flexiantxendom0-3.2.10.git] / include / linux / page-flags.h
index 584f10e..9eb2eee 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/types.h>
 #ifndef __GENERATING_BOUNDS_H
 #include <linux/mm_types.h>
-#include <linux/bounds.h>
+#include <generated/bounds.h>
 #endif /* !__GENERATING_BOUNDS_H */
 
 /*
@@ -74,7 +74,6 @@
  */
 enum pageflags {
        PG_locked,              /* Page is locked. Don't touch. */
-       PG_waiters,             /* Page has PG_locked waiters. */
        PG_error,
        PG_referenced,
        PG_uptodate,
@@ -101,7 +100,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
@@ -110,11 +109,6 @@ enum pageflags {
 #ifdef CONFIG_MEMORY_FAILURE
        PG_hwpoison,            /* hardware poisoned page. Don't touch */
 #endif
-#ifdef CONFIG_XEN
-       PG_foreign,             /* Page is owned by foreign allocator. */
-       /* PG_netback,             Page is owned by netback */
-       PG_blkback,             /* Page is owned by blkback */
-#endif
        __NR_PAGEFLAGS,
 
        /* Filesystems */
@@ -127,15 +121,8 @@ enum pageflags {
        PG_fscache = PG_private_2,      /* page backed by cache */
 
        /* XEN */
-#if defined(CONFIG_XEN)
-       PG_pinned = PG_locked,  /* Cannot alias with PG_owner_priv_1 since
-                                * bad_page() checks should include this bit.
-                                * Should not use PG_arch_1 as that may have
-                                * a different purpose elsewhere. */
-#elif defined(CONFIG_PARAVIRT_XEN)
        PG_pinned = PG_owner_priv_1,
        PG_savepinned = PG_dirty,
-#endif
 
        /* SLOB */
        PG_slob_free = PG_private,
@@ -220,7 +207,6 @@ static inline int __TestClearPage##uname(struct page *page) { return 0; }
 struct page;   /* forward declaration */
 
 TESTPAGEFLAG(Locked, locked) TESTSETFLAG(Locked, locked)
-PAGEFLAG(Waiters, waiters)
 PAGEFLAG(Error, error)
 PAGEFLAG(Referenced, referenced) TESTCLEARFLAG(Referenced, referenced)
 PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty)
@@ -229,12 +215,8 @@ PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active)
        TESTCLEARFLAG(Active, active)
 __PAGEFLAG(Slab, slab)
 PAGEFLAG(Checked, checked)             /* Used by some filesystems */
-#if defined(CONFIG_XEN) || defined(CONFIG_PARAVIRT_XEN)
 PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned)    /* Xen */
-#endif
-#ifdef CONFIG_PARAVIRT_XEN
 PAGEFLAG(SavePinned, savepinned);                      /* Xen */
-#endif
 PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
 PAGEFLAG(SwapBacked, swapbacked) __CLEARPAGEFLAG(SwapBacked, swapbacked)
 
@@ -285,12 +267,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
@@ -303,13 +283,15 @@ PAGEFLAG_FALSE(Uncached)
 
 #ifdef CONFIG_MEMORY_FAILURE
 PAGEFLAG(HWPoison, hwpoison)
-TESTSETFLAG(HWPoison, hwpoison)
+TESTSCFLAG(HWPoison, hwpoison)
 #define __PG_HWPOISON (1UL << PG_hwpoison)
 #else
 PAGEFLAG_FALSE(HWPoison)
 #define __PG_HWPOISON 0
 #endif
 
+u64 stable_page_flags(struct page *page);
+
 static inline int PageUptodate(struct page *page)
 {
        int ret = test_bit(PG_uptodate, &(page)->flags);
@@ -355,28 +337,6 @@ static inline void SetPageUptodate(struct page *page)
 
 CLEARPAGEFLAG(Uptodate, uptodate)
 
-#ifdef CONFIG_XEN
-TESTPAGEFLAG(Foreign, foreign)
-static inline void SetPageForeign(struct page *page,
-                                 void (*dtor)(struct page *, unsigned int))
-{
-       BUG_ON(!dtor);
-       set_bit(PG_foreign, &page->flags);
-       page->index = (long)dtor;
-}
-static inline void ClearPageForeign(struct page *page)
-{
-       clear_bit(PG_foreign, &page->flags);
-       page->index = 0;
-}
-static inline void PageForeignDestructor(struct page *page, unsigned int order)
-{
-       ((void (*)(struct page *, unsigned int))page->index)(page, order);
-}
-/*PAGEFLAG(Netback, netback)*/
-PAGEFLAG(Blkback, blkback)
-#endif
-
 extern void cancel_dirty_page(struct page *page, unsigned int account_size);
 
 int test_clear_page_writeback(struct page *page);
@@ -447,18 +407,12 @@ PAGEFLAG(MemError, memerror)
 PAGEFLAG_FALSE(MemError)
 #endif
 
-#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
+#ifdef CONFIG_MMU
 #define __PG_MLOCKED           (1 << PG_mlocked)
 #else
 #define __PG_MLOCKED           0
 #endif
 
-#ifndef CONFIG_XEN
-# define __PG_XEN              0
-#else
-# define __PG_XEN              (1 << PG_foreign)
-#endif
-
 /*
  * Flags checked when a page is freed.  Pages being freed should not have
  * these flags set.  It they are, there is a problem.
@@ -468,8 +422,7 @@ PAGEFLAG_FALSE(MemError)
         1 << PG_private | 1 << PG_private_2 | \
         1 << PG_buddy   | 1 << PG_writeback | 1 << PG_reserved | \
         1 << PG_slab    | 1 << PG_swapcache | 1 << PG_active | \
-        1 << PG_unevictable | __PG_MLOCKED | __PG_HWPOISON | \
-        __PG_XEN | 1 << PG_waiters)
+        1 << PG_unevictable | __PG_MLOCKED | __PG_HWPOISON)
 
 /*
  * Flags checked when a page is prepped for return by the page allocator.