xen: use PTE_MASK in pte_mfn()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Tuesday, May 20, 2008 - 8:59 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cbb307...
Commit:     cbb3077cbe718795d7ae5d78ed11659ca73c97b9
Parent:     ba23cef5c23cf1e9298032037d919157553d1211
Author:     Jeremy Fitzhardinge <jeremy@goop.org>
AuthorDate: Tue May 20 08:26:24 2008 +0100
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Tue May 20 07:51:21 2008 -0700

    xen: use PTE_MASK in pte_mfn()
    
    Use PTE_MASK to extract mfn from pte.
    
    Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
    Tested-by: Hugh Dickins <hugh@veritas.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 include/asm-x86/xen/page.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h
index 0179930..baf3a4d 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)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
xen: use PTE_MASK in pte_mfn(), Linux Kernel Mailing ..., (Tue May 20, 8:59 am)