lkml.org 
[lkml]   [2007]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectmemory barriers and MMIO, once again...
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/


\
 
 \ /
  Last update: 2007-12-16 00:57    [W:0.039 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site