* Re: memory-barriers.txt: cache coherency vs mmio
[not found] <fa.I0PBRKboi+ZcSNf2wJaKd5/Lavw@ifi.uio.no>
@ 2008-03-27 5:15 ` Robert Hancock
0 siblings, 0 replies; 2+ messages in thread
From: Robert Hancock @ 2008-03-27 5:15 UTC (permalink / raw)
To: Stefan Richter; +Cc: linux-kernel
Stefan Richter wrote:
> The subject section in memory-barriers.txt says:
>
> "[...] MMIO accesses may, in effect, overtake accesses to cached memory
> that were emitted earlier. A memory barrier isn't sufficient in such a
> case, but rather the cache must be flushed between the cached memory
> write and the MMIO access if the two are in any way dependent."
>
> And the lowly driver programmer immediately asks:
> How do I flush the cache?
>
> In particular, do I have to do anyhing between
>
> coherent_dma_buffer->datum = something;
>
> writel(YOU_CAN_START_DMA_NOW, register);
>
> Thanks,
That part of the document seems kind of bogus to me. Or rather, if it's
true and there are architectures where ordering between normal memory
writes and MMIO is not ensured even with wmb(), that's the bogus part.
Driver authors should not have to deal with that sort of thing.
^ permalink raw reply [flat|nested] 2+ messages in thread
* memory-barriers.txt: cache coherency vs mmio
@ 2008-03-26 21:09 Stefan Richter
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Richter @ 2008-03-26 21:09 UTC (permalink / raw)
To: linux-kernel
The subject section in memory-barriers.txt says:
"[...] MMIO accesses may, in effect, overtake accesses to cached memory
that were emitted earlier. A memory barrier isn't sufficient in such a
case, but rather the cache must be flushed between the cached memory
write and the MMIO access if the two are in any way dependent."
And the lowly driver programmer immediately asks:
How do I flush the cache?
In particular, do I have to do anyhing between
coherent_dma_buffer->datum = something;
writel(YOU_CAN_START_DMA_NOW, register);
Thanks,
--
Stefan Richter
-=====-==--- --== ==-=-
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-27 5:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <fa.I0PBRKboi+ZcSNf2wJaKd5/Lavw@ifi.uio.no>
2008-03-27 5:15 ` memory-barriers.txt: cache coherency vs mmio Robert Hancock
2008-03-26 21:09 Stefan Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox