Skip to contentSkip to conversation

allow for architecture to "decorate" dev_bus_addr

PATCH New Jimi Xenidis 1 participant 1 message Oct 8, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 allow for architecture to "decorate" dev_bus_addr

Not for inclusion for 3.0.3 but it should be harmless. But includes patch this time :)

The following patch allows for an architecture to decorate the dev_bus_addr returned by a gnttab mapping.

xen/common/grant_table.c +1 -1
diff -r e30376a0abc3 xen/common/grant_table.c
@@ -280,7 +280,7 @@ __gnttab_map_grant_ref(
     ld->grant_table->maptrack[handle].ref   = op->ref;
     ld->grant_table->maptrack[handle].flags = op->flags;
 
-    op->dev_bus_addr = (u64)frame << PAGE_SHIFT;
+    op->dev_bus_addr = GNTTAB_DEV_BUS((u64)frame << PAGE_SHIFT);
     op->handle       = handle;
     op->status       = GNTST_okay;
 
xen/include/xen/grant_table.h +4 -0
diff -r e30376a0abc3 xen/include/xen/grant_table.h
@@ -96,4 +96,8 @@ gnttab_release_mappings(
 gnttab_release_mappings(
     struct domain *d);
 
+#ifndef GNTTAB_DEV_BUS
+#define GNTTAB_DEV_BUS(f) (f)
+#endif
+
 #endif /* __XEN_GRANT_TABLE_H__ */