[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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

The statement

    synchronise a single contiguous or scatter/gather mapping.  All the
    parameters must be the same as those passed into the single mapping
    API.

in DMA-API.txt also is clearly attached to dma_sync_sg().  So I don't
think it's a good idea to rely on being able to sync a different
scatterlist than the one that was originally mapped.

It actually doesn't look too bad to replace our use of pci_map_sg()
with dma_map_single(), at least at first glance.  I'll try to write a
patch later.

 - R.

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.