mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* memory barriers and MMIO, once again...
@ 2007-12-15 23:53 Stefan Richter
  0 siblings, 0 replies; only message in thread
From: Stefan Richter @ 2007-12-15 23:53 UTC (permalink / raw)
  To: linux-kernel

Hi all,

in a single thread of execution, writel() and friends are ordered WRT
each other.  But I keep forgetting one thing:

Is writel() ordered WRT regular memory accesses?  That is, if I prepare
data in a coherent DMA buffer and then tell the device by writel() that
it's good to go, do I need a wmb() before the writel()?

*If* the answer to this is yes, then I also seem to need a wmb() between
dma_sync_single_for_device() and writel() if that writel tells the
device to use data from that synced DMA area, because the sync expands
to empty inline functions on simple architectures.  Or are there further
ordering guarantees on these architectures which eliminate the need for
a wmb() in this case?  If so, would I still need a barrier()?

Thanks,
-- 
Stefan Richter
-=====-=-=== ==-- =----
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-15 23:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-15 23:53 memory barriers and MMIO, once again Stefan Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®