Re: [Patch] dma_sync_to_device
From: James Bottomley
Date: Sat Feb 14 2004 - 17:36:31 EST
On Sat, 2004-02-14 at 03:51, Martin Diehl wrote:
> Ok, will do.
> Just to make sure I got you right, your concern is people mixing up the
> effect of this call with some means to sync with posted writes on iomem
> mapped memory location provided by some device on the bus? I.e. the
> situation where they probably want to use readl() or similar to force the
> posted writes to complete in contrast to sync_to_device which ensures the
> modified system memory gets synced before the busmastering starts?
Yes, that's it.
> If so, wouldn't this concern be related to the pci_dma api as a whole, not
> only the new pci_dma_sync_to_device call particularly? I mean, none of the
> api functions to deal with consistent or streaming maps of system memory
> are applicable for flushing posted writes to iomem on the bus. Maybe the
> confusion comes from the fact on some archs the pci_dma_sync call would
> have to flush posted writes _from_ the busmaster device to system memory?
Well ... people did ask, even in the old api. The excuse always was
that the cache coherency aspect deals exclusively with the CPU cache.
Now you're adding an API specifically to deal with possible bus caches,
I just wanted it to be crystal clear that you can't use the bus cache
API for flushing posted writes.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/