Re: [Patch] dma_sync_to_device

From: Martin Diehl
Date: Sat Feb 14 2004 - 03:49:06 EST


On 13 Feb 2004, James Bottomley wrote:

> Just to be sure we eliminate all confusion (and it amazes me how
> frequently this comes up), could you add some words DMA-mapping.txt to
> make clear that this new API does not address PCI posting (which is a
> problem with onward write cache flushing in the PCI bridge)---otherwise
> I can see device driver writers thinking that
> pci_dma_sync_to_device_single(... DMA_TO_DEVICE) will flush posted
> writes.

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?

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?

Could you please confirm my understanding of the issue is correct (or not)
before I'm trying to add some clarification to DMA-mapping.txt.

Martin

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