[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-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 8515e163f1dfde374dbeee1ad843f218f124ea1f
# Parent  a0b47a11b52df23c2fbbe447fedb807bfceeaf32
[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 |    1 -
 2 files changed, 23 insertions(+), 1 deletion(-)

diff -r a0b47a11b52d -r 8515e163f1df 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/uaccess.h>
+#include <asm/debugger.h>
 
 #define memguard_guard_range(_p,_l)    ((void)0)
 #define memguard_unguard_range(_p,_l)    ((void)0)
@@ -274,4 +275,26 @@ extern int steal_page(struct domain *d, 
 extern int steal_page(struct domain *d, struct page_info *page,
                         unsigned int memflags);
 
+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 a0b47a11b52d -r 8515e163f1df 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)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.