Xen uses bitops to manipulate page flags. Make it use proper page flag
functions.
Signed-off-by: Christoph Lameter <[email protected]>
---
arch/x86/xen/mmu.c | 4 ++--
include/linux/page-flags.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Index: linux-2.6/arch/x86/xen/mmu.c
===================================================================
--- linux-2.6.orig/arch/x86/xen/mmu.c 2008-03-03 15:45:09.207335791 -0800
+++ linux-2.6/arch/x86/xen/mmu.c 2008-03-03 15:48:09.469801962 -0800
@@ -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/include/linux/page-flags.h
===================================================================
--- linux-2.6.orig/include/linux/page-flags.h 2008-03-03 15:46:15.848254180 -0800
+++ linux-2.6/include/linux/page-flags.h 2008-03-03 15:48:09.469801962 -0800
@@ -155,7 +155,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)
--