xen: add page_to_mfn()
authorDavid Vrabel <david.vrabel@citrix.com>
Tue, 13 Jan 2015 17:16:42 +0000 (17:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Jan 2015 05:22:00 +0000 (00:22 -0500)
pfn_to_mfn(page_to_pfn(p)) is a common use case so add a generic
helper for it.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/xen/page.h

index 12765b6..c5ed20b 100644 (file)
@@ -3,6 +3,11 @@
 
 #include <asm/xen/page.h>
 
+static inline unsigned long page_to_mfn(struct page *page)
+{
+       return pfn_to_mfn(page_to_pfn(page));
+}
+
 struct xen_memory_region {
        phys_addr_t start;
        phys_addr_t size;