diff options
author | Will Deacon <will.deacon@arm.com> | 2013-09-04 07:30:08 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2014-10-20 13:49:18 -0400 |
commit | a8e0aead70b4af957e6b27b82fba849c6179b707 (patch) | |
tree | 2127e811b50ddf23f21ae678abc129b34e52ded7 | |
parent | cbc908ef8e6babc40cb929f46ea1b8a26cbdbce0 (diff) |
documentation: memory-barriers: clarify relaxed io accessor semantics
This patch extends the paragraph describing the relaxed read io accessors
so that the relaxed accessors are defined to be:
- Ordered with respect to each other if accessing the same peripheral
- Unordered with respect to normal memory accesses
- Unordered with respect to LOCK/UNLOCK operations
Whilst many architectures will provide stricter semantics, ARM, Alpha and
PPC can achieve significant performance gains by taking advantage of some
or all of the above relaxations.
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | Documentation/memory-barriers.txt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 22a969cdd476..4af4cea8cff0 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -2465,10 +2465,15 @@ functions: | |||
2465 | Please refer to the PCI specification for more information on interactions | 2465 | Please refer to the PCI specification for more information on interactions |
2466 | between PCI transactions. | 2466 | between PCI transactions. |
2467 | 2467 | ||
2468 | (*) readX_relaxed() | 2468 | (*) readX_relaxed(), writeX_relaxed() |
2469 | 2469 | ||
2470 | These are similar to readX(), but are not guaranteed to be ordered in any | 2470 | These are similar to readX() and writeX(), but provide weaker memory |
2471 | way. Be aware that there is no I/O read barrier available. | 2471 | ordering guarantees. Specifically, they do not guarantee ordering with |
2472 | respect to normal memory accesses (e.g. DMA buffers) nor do they guarantee | ||
2473 | ordering with respect to LOCK or UNLOCK operations. If the latter is | ||
2474 | required, an mmiowb() barrier can be used. Note that relaxed accesses to | ||
2475 | the same peripheral are guaranteed to be ordered with respect to each | ||
2476 | other. | ||
2472 | 2477 | ||
2473 | (*) ioreadX(), iowriteX() | 2478 | (*) ioreadX(), iowriteX() |
2474 | 2479 | ||