On Fri, 2010-06-11 at 02:38 +0100, Nick Piggin wrote:
Are there any public references to this discussion? Maybe a
Documentation/ file (or update the memory-barriers.txt one would be
useful).
I guess correctness takes precedence here but on ARM, the only way to
ensure relative ordering between non-cacheable writes and I/O writes is
by flushing the write buffer (and an L2 write buffer if external cache
is present). Hence the expensive mb().
The only reference of DMA buffers vs I/O I found in the DMA-API.txt
file:
Consistent memory is memory for which a write by either the
device or the processor can immediately be read by the processor
or device without having to worry about caching effects. (You
may however need to make sure to flush the processor's write
buffers before telling devices to read that memory.)
But there is no API for "flushing the processor's write buffers". Does
it mean that this should be taken care of in writel()? We would make the
I/O accessors pretty expensive on some architectures.
Thanks.
--
Catalin
--