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-ia64-devel

[Xen-ia64-devel] RE: [Patch] Add put/get_page for XEN/IA64

To: "Magenheimer, Dan \(HP Labs Fort Collins\)" <dan.magenheimer@xxxxxx>
Subject: [Xen-ia64-devel] RE: [Patch] Add put/get_page for XEN/IA64
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Wed, 15 Jun 2005 18:36:08 +0800
Cc: cwc22@xxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 15 Jun 2005 10:35:19 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: DIscussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcVvu40jWWBMraRKQgq8KU4Aol15rQBX5pvQAB0h9aA=
Thread-topic: [Patch] Add put/get_page for XEN/IA64
>-----Original Message-----
>From: Magenheimer, Dan (HP Labs Fort Collins)
>[mailto:dan.magenheimer@xxxxxx]
>Sent: Wednesday, June 15, 2005 4:03 AM
>
>Kevin --
>
>I just noticed (from trying to compile grant_table.c with these
>changes) that you have misdefined get_page_and_type with one
>too few parameters to get_page.  Also, what about put_page_type()
>(not put_page_and_type())?
>

I think one point that we all agree by far - there's no type info
currently used for IA64, since XEN/IA64 doesn't track guest page table.
However to reserve future possibility to add that info, I changed the
code a bit similar to x86. Yes, put_page_type is ignored definitely
before.

Signed-off-by Kevin Tian <Kevin.tian@xxxxxxxxx>

Thanks,
Kevin

--- xeno-unstable-ia64.3/xen/include/asm-ia64/mm.h      2005-06-15
18:11:41.000000000 +0800
+++ xeno-unstable-ia64.4/xen/include/asm-ia64/mm.h      2005-06-15
18:16:48.000000000 +0800
@@ -169,8 +169,29 @@ static inline int get_page(struct pfn_in
 }

 /* No type info now */
-#define put_page_and_type(page) put_page((page))
-#define get_page_and_type(page, domain, type) get_page((page))
+#define put_page_type(page)
+#define get_page_type(page, type) 1
+static inline void put_page_and_type(struct pfn_info *page)
+{
+    put_page_type(page);
+    put_page(page);
+}
+
+
+static inline int get_page_and_type(struct pfn_info *page,
+                                    struct domain *domain,
+                                    u32 type)
+{
+    int rc = get_page(page, domain);
+
+    if ( likely(rc) && unlikely(!get_page_type(page, type)) )
+    {
+        put_page(page);
+        rc = 0;
+    }
+
+    return rc;
+}

 #define        set_machinetophys(_mfn, _pfn) do { } while(0);

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

<Prev in Thread] Current Thread [Next in Thread>