aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-04-28 05:12:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:22 -0400
commitd60cd46bbdc5a79d9a177e40009f960e44f0e334 (patch)
tree50bf8f927746dfd4a00583706646c405eec129eb
parent6a1e7f777f613bf0df99c7772fa2123d01ce2f7d (diff)
pageflags: use proper page flag functions in Xen
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>
-rw-r--r--arch/x86/xen/mmu.c4
-rw-r--r--include/linux/page-flags.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 6cbcf65609ad..126766d43aea 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -387,7 +387,7 @@ static void xen_do_pin(unsigned level, unsigned long pfn)
387 387
388static int pin_page(struct page *page, enum pt_level level) 388static int pin_page(struct page *page, enum pt_level level)
389{ 389{
390 unsigned pgfl = test_and_set_bit(PG_pinned, &page->flags); 390 unsigned pgfl = TestSetPagePinned(page);
391 int flush; 391 int flush;
392 392
393 if (pgfl) 393 if (pgfl)
@@ -468,7 +468,7 @@ void __init xen_mark_init_mm_pinned(void)
468 468
469static int unpin_page(struct page *page, enum pt_level level) 469static int unpin_page(struct page *page, enum pt_level level)
470{ 470{
471 unsigned pgfl = test_and_clear_bit(PG_pinned, &page->flags); 471 unsigned pgfl = TestClearPagePinned(page);
472 472
473 if (pgfl && !PageHighMem(page)) { 473 if (pgfl && !PageHighMem(page)) {
474 void *pt = lowmem_page_address(page); 474 void *pt = lowmem_page_address(page);
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index ed7659adfaaf..3cafd878e4ca 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -159,7 +159,7 @@ PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(LRU, lru)
159PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active) 159PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active)
160__PAGEFLAG(Slab, slab) 160__PAGEFLAG(Slab, slab)
161PAGEFLAG(Checked, checked) /* Used by some filesystems */ 161PAGEFLAG(Checked, checked) /* Used by some filesystems */
162PAGEFLAG(Pinned, pinned) /* Xen pinned pagetable */ 162PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned) /* Xen pagetable */
163PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved) 163PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
164PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private) 164PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private)
165 __SETPAGEFLAG(Private, private) 165 __SETPAGEFLAG(Private, private)