# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID bc9f304c88a178f2216457e03964b399cc5e5028
# Parent c5fa9bb0aad76372dd2917feaa2721ad3cf73389
Define gnttab_shared_gpfn() for use in common code.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
diff -r c5fa9bb0aad7 -r bc9f304c88a1 xen/common/grant_table.c
--- a/xen/common/grant_table.c Tue Jan 31 18:55:08 2006
+++ b/xen/common/grant_table.c Tue Jan 31 23:49:56 2006
@@ -481,7 +481,7 @@
gnttab_setup_table_t op;
struct domain *d;
int i;
- unsigned long mfn;
+ unsigned long gpfn;
if ( count != 1 )
return -EINVAL;
@@ -523,8 +523,8 @@
(void)put_user(GNTST_okay, &uop->status);
for ( i = 0; i < op.nr_frames; i++ )
{
- mfn = __mfn_to_gpfn(d, gnttab_shared_mfn(d, d->grant_table, i));
- (void)put_user(mfn, &op.frame_list[i]);
+ gpfn = gnttab_shared_gpfn(d, d->grant_table, i);
+ (void)put_user(gpfn, &op.frame_list[i]);
}
}
diff -r c5fa9bb0aad7 -r bc9f304c88a1 xen/include/asm-ia64/grant_table.h
--- a/xen/include/asm-ia64/grant_table.h Tue Jan 31 18:55:08 2006
+++ b/xen/include/asm-ia64/grant_table.h Tue Jan 31 23:49:56 2006
@@ -14,7 +14,7 @@
#define gnttab_create_shared_mfn(d, t, i) ((void)0)
-#define gnttab_shared_mfn(d, t, i) \
+#define gnttab_shared_gpfn(d, t, i) \
( ((d) == dom0) ? \
((virt_to_phys((t)->shared) >> PAGE_SHIFT) + (i)) : \
(map_domain_page((d), 1UL<<40, virt_to_phys((t)->shared)), \
diff -r c5fa9bb0aad7 -r bc9f304c88a1 xen/include/asm-x86/grant_table.h
--- a/xen/include/asm-x86/grant_table.h Tue Jan 31 18:55:08 2006
+++ b/xen/include/asm-x86/grant_table.h Tue Jan 31 23:49:56 2006
@@ -33,6 +33,9 @@
#define gnttab_shared_mfn(d, t, i) \
((virt_to_phys((t)->shared) >> PAGE_SHIFT) + (i))
+#define gnttab_shared_gpfn(d, t, i) \
+ (__mfn_to_gpfn(d, gnttab_shared_mfn(d, t, i)))
+
#define gnttab_log_dirty(d, f) mark_dirty((d), (f))
#endif /* __ASM_GRANT_TABLE_H__ */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|