|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
[Xen-ia64-devel] RE: [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
|
|
|
|
|