WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [xenppc-unstable] [POWERPC][XEN] Move gmfn_to_mfn() from page.h

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] [POWERPC][XEN] Move gmfn_to_mfn() from page.h to mm.h to avoid recursive header dependencies.
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 03 Oct 2006 23:30:33 +0000
Delivery-date: Wed, 04 Oct 2006 04:32:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [xenppc-unstable] [POWERPC][XEN] Move gmfn_to_mfn() from page.h to mm.h to avoid recursive header dependencies., Xen patchbot-xenppc-unstable <=