Xen: Add virt_to_pfn helper function
authorAlex Nixon <alex.nixon@citrix.com>
Mon, 9 Feb 2009 20:05:46 +0000 (12:05 -0800)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Wed, 8 Apr 2009 18:51:46 +0000 (11:51 -0700)
Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
arch/x86/include/asm/xen/page.h

index 1a918dde46b503272b26e6070d198460f825f0c0..018a0a400799c33bb85b866b63fd7a2dbb4d4e04 100644 (file)
@@ -124,7 +124,8 @@ static inline unsigned long mfn_to_local_pfn(unsigned long mfn)
 
 /* VIRT <-> MACHINE conversion */
 #define virt_to_machine(v)     (phys_to_machine(XPADDR(__pa(v))))
-#define virt_to_mfn(v)         (pfn_to_mfn(PFN_DOWN(__pa(v))))
+#define virt_to_pfn(v)          (PFN_DOWN(__pa(v)))
+#define virt_to_mfn(v)         (pfn_to_mfn(virt_to_pfn(v)))
 #define mfn_to_virt(m)         (__va(mfn_to_pfn(m) << PAGE_SHIFT))
 
 static inline unsigned long pte_mfn(pte_t pte)