From: Christoph Lameter Subject: 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 --- arch/x86/xen/mmu.c | 4 ++-- include/linux/page-flags.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Index: linux-2.6.25-rc5-mm1/arch/x86/xen/mmu.c =================================================================== --- linux-2.6.25-rc5-mm1.orig/arch/x86/xen/mmu.c 2008-03-20 12:27:31.024543396 -0700 +++ linux-2.6.25-rc5-mm1/arch/x86/xen/mmu.c 2008-03-20 13:00:00.506212338 -0700 @@ -425,7 +425,7 @@ static void xen_do_pin(unsigned level, u 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) @@ -506,7 +506,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: linux-2.6.25-rc5-mm1/include/linux/page-flags.h =================================================================== --- linux-2.6.25-rc5-mm1.orig/include/linux/page-flags.h 2008-03-20 12:59:56.622206795 -0700 +++ linux-2.6.25-rc5-mm1/include/linux/page-flags.h 2008-03-20 13:00:00.506212338 -0700 @@ -162,7 +162,7 @@ PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(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)