summaryrefslogtreecommitdiffstats
path: root/include/xen/page.h
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2015-01-13 18:16:42 +0100
committerDavid S. Miller <davem@davemloft.net>2015-01-14 06:22:00 +0100
commit28e98c2c20e9d791cf58a624a5a2b1fca63ea47b (patch)
treec677669892f774885038d2cb294a342396a1f8cf /include/xen/page.h
parentrhashtable: Add MAINTAINERS entry (diff)
downloadlinux-28e98c2c20e9d791cf58a624a5a2b1fca63ea47b.tar.xz
linux-28e98c2c20e9d791cf58a624a5a2b1fca63ea47b.zip
xen: add page_to_mfn()
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>
Diffstat (limited to 'include/xen/page.h')
-rw-r--r--include/xen/page.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/xen/page.h b/include/xen/page.h
index 12765b6f9517..c5ed20bb3fe9 100644
--- a/include/xen/page.h
+++ b/include/xen/page.h
@@ -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;