Skip to content

Commit

Permalink
xen: add page_to_mfn()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Vrabel authored and David S. Miller committed Jan 14, 2015
1 parent 933685c commit 28e98c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/xen/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 28e98c2

Please sign in to comment.