diff options
author | Will Deacon <will.deacon@arm.com> | 2018-05-14 15:55:26 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-05-15 08:11:13 +0200 |
commit | 5846581e35637771952602eecc1e20ece5ced011 (patch) | |
tree | e61c9f77328e9aae6ea524ce45a2905d010d42b3 /Documentation/translations | |
parent | 371b3269082500fc418043742467119ab0d224c6 (diff) | |
download | linux-5846581e35637771952602eecc1e20ece5ced011.tar.gz linux-5846581e35637771952602eecc1e20ece5ced011.tar.bz2 linux-5846581e35637771952602eecc1e20ece5ced011.zip |
locking/memory-barriers.txt: Fix broken DMA vs. MMIO ordering example
The section of memory-barriers.txt that describes the dma_Xmb() barriers
has an incorrect example claiming that a wmb() is required after writing
to coherent memory in order for those writes to be visible to a device
before a subsequent MMIO access using writel() can reach the device.
In fact, this ordering guarantee is provided (at significant cost on some
architectures such as arm and power) by writel, so the wmb() is not
necessary. writel_relaxed exists for cases where this ordering is not
required.
Fix the example and update the text to make this clearer.
Reported-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akiyks@gmail.com
Cc: boqun.feng@gmail.com
Cc: dhowells@redhat.com
Cc: j.alglave@ucl.ac.uk
Cc: linux-arch@vger.kernel.org
Cc: luc.maranget@inria.fr
Cc: npiggin@gmail.com
Cc: parri.andrea@gmail.com
Cc: stern@rowland.harvard.edu
Link: http://lkml.kernel.org/r/1526338533-6044-1-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'Documentation/translations')
0 files changed, 0 insertions, 0 deletions