Re: Memory-mapped I/O barriers, state of affairs?

From: Leon Woestenberg
Date: Mon Mar 22 2010 - 18:12:47 EST


Hello Andreas, all,

On Mon, Mar 22, 2010 at 9:16 PM, Andreas Bombe <aeb@xxxxxxxxxx> wrote:
> On Mon, Mar 22, 2010 at 08:18:49PM +0100, Leon Woestenberg wrote:
>> What is the current solution for that particular problem, i.e. how
>> should I make sure host memory writes are committed before I have an
>> external DMA device act on it?
>
> The dma_sync_* functions, if you reuse DMA buffers without unmapping,
> take care of that.  Otherwise the process of mapping them handles it.
>
The mapping makes the memory cache-coherent. I already use that.

But does that mean that this coherency is guaranteed to occur before I
start MMIO access to a device, i.e. is there a guaranteed ordering
between the writes?

Regards,
--
Leon
--
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/