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-changelog

[Xen-changelog] [xen-unstable] [POWERPC][XEN] Move gmfn_to_mfn() from pa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [POWERPC][XEN] Move gmfn_to_mfn() from page.h to mm.h to avoid recursive header dependencies.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Dec 2006 17:34:30 +0000
Delivery-date: Wed, 13 Dec 2006 09:36:17 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

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