[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XenPPC] [xenppc-unstable] [POWERPC][XEN] Move gmfn_to_mfn() from page.h to mm.h to avoid recursive header dependencies.
# HG changeset patch # User Hollis Blanchard <hollisb@xxxxxxxxxx> # Node ID c3312bbd598a50b3c48955a8f4c9dba6330fc7d8 # Parent d1f6d0f820d890ac6075f47ad1ba6e38012167b4 [POWERPC][XEN] Move gmfn_to_mfn() from page.h to mm.h to avoid recursive header dependencies. Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx> --- xen/include/asm-powerpc/mm.h | 23 +++++++++++++++++++++++ xen/include/asm-powerpc/page.h | 23 ----------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff -r d1f6d0f820d8 -r c3312bbd598a xen/include/asm-powerpc/mm.h --- a/xen/include/asm-powerpc/mm.h Mon Oct 02 21:43:09 2006 -0400 +++ b/xen/include/asm-powerpc/mm.h Tue Oct 03 18:23:21 2006 -0500 @@ -28,6 +28,7 @@ #include <asm/system.h> #include <asm/flushtlb.h> #include <asm/page.h> +#include <asm/debugger.h> #define memguard_guard_range(_p,_l) ((void)0) #define memguard_unguard_range(_p,_l) ((void)0) @@ -244,4 +245,26 @@ extern int steal_page(struct domain *d, #define access_ok(addr,size) 1 #define array_access_ok(addr,count,size) 1 +static inline unsigned long gmfn_to_mfn(struct domain *d, unsigned long gmfn) +{ + int mtype; + ulong mfn; + + mfn = pfn2mfn(d, gmfn, &mtype); + if (mfn != INVALID_MFN) { + switch (mtype) { + case PFN_TYPE_RMA: + case PFN_TYPE_LOGICAL: + break; + default: + WARN(); + mfn = INVALID_MFN; + break; + } + } + return mfn; +} + +#define mfn_to_gmfn(_d, mfn) (mfn) + #endif diff -r d1f6d0f820d8 -r c3312bbd598a xen/include/asm-powerpc/page.h --- a/xen/include/asm-powerpc/page.h Mon Oct 02 21:43:09 2006 -0400 +++ b/xen/include/asm-powerpc/page.h Tue Oct 03 18:23:21 2006 -0500 @@ -30,7 +30,6 @@ #include <xen/config.h> #include <asm/cache.h> -#include <asm/debugger.h> #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) @@ -146,27 +145,5 @@ extern unsigned long paddr_to_maddr(unsi /* XXX only used for debug print right now... */ #define get_gpfn_from_mfn(mfn) (mfn) -static inline unsigned long gmfn_to_mfn(struct domain *d, unsigned long gmfn) -{ - int mtype; - ulong mfn; - - mfn = pfn2mfn(d, gmfn, &mtype); - if (mfn != INVALID_MFN) { - switch (mtype) { - case PFN_TYPE_RMA: - case PFN_TYPE_LOGICAL: - break; - default: - WARN(); - mfn = INVALID_MFN; - break; - } - } - return mfn; -} - -#define mfn_to_gmfn(_d, mfn) (mfn) - #endif /* ! __ASSEMBLY__ */ #endif _______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ppc-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |