pageflags: use proper page flag functions in Xen
authorChristoph Lameter <clameter@sgi.com>
Mon, 28 Apr 2008 09:12:51 +0000 (02:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Apr 2008 15:58:22 +0000 (08:58 -0700)
Xen uses bitops to manipulate page flags.  Make it use proper page flag
functions.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/xen/mmu.c
include/linux/page-flags.h

index 6cbcf65609addd6f04d6d6b8d05607624442337b..126766d43aea11bdfa024af7b1fae126542abff6 100644 (file)
@@ -387,7 +387,7 @@ static void xen_do_pin(unsigned level, unsigned long pfn)
 
 static int pin_page(struct page *page, enum pt_level level)
 {
-       unsigned pgfl = test_and_set_bit(PG_pinned, &page->flags);
+       unsigned pgfl = TestSetPagePinned(page);
        int flush;
 
        if (pgfl)
@@ -468,7 +468,7 @@ void __init xen_mark_init_mm_pinned(void)
 
 static int unpin_page(struct page *page, enum pt_level level)
 {
-       unsigned pgfl = test_and_clear_bit(PG_pinned, &page->flags);
+       unsigned pgfl = TestClearPagePinned(page);
 
        if (pgfl && !PageHighMem(page)) {
                void *pt = lowmem_page_address(page);
index ed7659adfaaf4bfc15ed053223389ec55cc342f9..3cafd878e4ca60d2b25972c39b973c17683e217e 100644 (file)
@@ -159,7 +159,7 @@ PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(LRU, lru)
 PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active)
 __PAGEFLAG(Slab, slab)
 PAGEFLAG(Checked, checked)             /* Used by some filesystems */
-PAGEFLAG(Pinned, pinned)               /* Xen pinned pagetable */
+PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned) /* Xen pagetable */
 PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
 PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private)
        __SETPAGEFLAG(Private, private)