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>
This commit is contained in:
David Vrabel 2015-01-13 17:16:42 +00:00 committed by David S. Miller
parent 933685cacb
commit 28e98c2c20
1 changed files with 5 additions and 0 deletions

View 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;