From: Jimi Xenidis Subject: [PATCH][XEN] allow for architecture to "decorate" dev_bus_addr Date: Sun, 08 Oct 2006 11:32:25 -0400 Message-ID: Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com, xen-ppc-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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. Signed-off-by: Jimi Xenidis diff -r e30376a0abc3 xen/common/grant_table.c --- a/xen/common/grant_table.c Sat Oct 07 16:25:46 2006 -0400 +++ b/xen/common/grant_table.c Sun Oct 08 11:26:51 2006 -0400 @@ -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; diff -r e30376a0abc3 xen/include/xen/grant_table.h --- a/xen/include/xen/grant_table.h Sat Oct 07 16:25:46 2006 -0400 +++ b/xen/include/xen/grant_table.h Sun Oct 08 11:26:51 2006 -0400 @@ -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__ */