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

[Xen-devel] Re: [PATCH][Linux] gnttab: make dma address conversion logic

To: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH][Linux] gnttab: make dma address conversion logic of gnttab dma arch specific.
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Jun 2007 18:23:20 +1000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 11 Jun 2007 01:21:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070611073527.GD3845%yamahata@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070611073527.GD3845%yamahata@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Mon, Jun 11, 2007 at 04:35:27PM +0900, Isaku Yamahata wrote:
> This patch is cleaned up of the patch which was sent as
> http://lists.xensource.com/archives/html/xen-devel/2007-06/msg00324.html

Thanks for the patch! I completely agree with your idea of making
this architecture-specific but I have question about the implementaiton.

> diff -r d5e0eb7dd069 -r 69e2dd4e06c4 drivers/xen/core/gnttab.c
> --- a/drivers/xen/core/gnttab.c       Sun Jun 10 19:50:32 2007 +0100
> +++ b/drivers/xen/core/gnttab.c       Mon Jun 11 16:13:06 2007 +0900
> @@ -593,20 +593,18 @@ EXPORT_SYMBOL(gnttab_copy_grant_page);
>   *
>   * All other pages are simply returned as is.
>   */
> -maddr_t gnttab_dma_map_page(struct page *page)
> -{
> -     maddr_t maddr = page_to_bus(page);
> +void __gnttab_dma_map_page(struct page *page,
> +                        int (*local_pfn)(struct page *page))

Do we really need a callback here? In other words when would a
single architecture need to have two different values for local_pfn
here?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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