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: mthca use of dma_sync_single is bogus

To: Roland Dreier <rdreier@xxxxxxxxx>
Subject: [Xen-devel] Re: mthca use of dma_sync_single is bogus
From: "Michael S. Tsirkin" <mst@xxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Jul 2007 20:11:42 +0300
Cc: Keir Fraser <keir@xxxxxxxxxxxxx>, Lukas Hejtmanek <xhejtman@xxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, "Michael S. Tsirkin" <mst@xxxxxxxxxxxxxxxxxx>, general@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 17 Jul 2007 05:00:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <adabqekuvde.fsf@xxxxxxxxx>
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: <adalkdpxopo.fsf@xxxxxxxxx> <20070709213913.GB20052@xxxxxxxxxxxxxx> <adamyy4vjo9.fsf@xxxxxxxxx> <20070710071547.GA3814@xxxxxxxxxxxxxx> <adabqekuvde.fsf@xxxxxxxxx>
Reply-to: "Michael S. Tsirkin" <mst@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
> Quoting Roland Dreier <rdreier@xxxxxxxxx>:
> Subject: Re: mthca use of dma_sync_single is bogus
> 
>  > What makes you think dma_sync_single_range can't be used on memory mapped
>  > by pci_map_sg/dma_map_sg?
> 
> The fact that it's dma_sync_*SINGLE*_range, and that there's a
> separate dma_sync_sg() function defined in DMA-API.txt.

Aha. I looked at the code a bit.
Basically is seems that some architectures use the dma handle
and some the virtual address to flush the cache, that's
where the requirement that same parameters are used for
sync single as for map single comes from.

So it seems that this requirement does not apply to s/g, and that we can just
build a scatterlist structure and do dma_sync_sg?

-- 
MST

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