[ofa-general] Re: mthca use of dma_sync_single is bogus

Michael S. Tsirkin mst at dev.mellanox.co.il
Tue Jul 10 10:11:42 PDT 2007


> Quoting Roland Dreier <rdreier at cisco.com>:
> 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



More information about the general mailing list