From: Jeremy Fitzhardinge Date: Tue, 20 May 2008 07:26:24 +0000 (+0100) Subject: xen: use PTE_MASK in pte_mfn() X-Git-Tag: v2.6.26-rc4~104 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbb3077cbe718795d7ae5d78ed11659ca73c97b9;p=linux-2.6 xen: use PTE_MASK in pte_mfn() Use PTE_MASK to extract mfn from pte. Signed-off-by: Jeremy Fitzhardinge Tested-by: Hugh Dickins Signed-off-by: Linus Torvalds --- diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h index 01799305f0..baf3a4dce2 100644 --- a/include/asm-x86/xen/page.h +++ b/include/asm-x86/xen/page.h @@ -127,7 +127,7 @@ static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn) static inline unsigned long pte_mfn(pte_t pte) { - return (pte.pte & ~_PAGE_NX) >> PAGE_SHIFT; + return (pte.pte & PTE_MASK) >> PAGE_SHIFT; } static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot)