summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2015-03-31 11:39:41 +0300
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-05-27 22:57:27 +0300
commitd956028e99b30726b0bce0ca684b40b1ad67b514 (patch)
tree9ac343191ce631a313cf1ac810b61d15b73bea8e /Documentation
parent7d0ae8086b828311250c6afdf800b568ac9bd693 (diff)
downloadlinux-d956028e99b30726b0bce0ca684b40b1ad67b514.tar.xz
documentation: memory-barriers: Fix smp_mb__before_spinlock() semantics
Our current documentation claims that, when followed by an ACQUIRE, smp_mb__before_spinlock() orders prior loads against subsequent loads and stores, which isn't the intent. This commit therefore fixes the documentation to state that this sequence orders only prior stores against subsequent loads and stores. In addition, the original intent of smp_mb__before_spinlock() was to only order prior loads against subsequent stores, however, people have started using it as if it ordered prior loads against subsequent loads and stores. This commit therefore also updates smp_mb__before_spinlock()'s header comment to reflect this new reality. Cc: Oleg Nesterov <oleg@redhat.com> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/memory-barriers.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index f95746189b5d..1f362fd2ecb4 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -1784,10 +1784,9 @@ for each construct. These operations all imply certain barriers:
Memory operations issued before the ACQUIRE may be completed after
the ACQUIRE operation has completed. An smp_mb__before_spinlock(),
- combined with a following ACQUIRE, orders prior loads against
- subsequent loads and stores and also orders prior stores against
- subsequent stores. Note that this is weaker than smp_mb()! The
- smp_mb__before_spinlock() primitive is free on many architectures.
+ combined with a following ACQUIRE, orders prior stores against
+ subsequent loads and stores. Note that this is weaker than smp_mb()!
+ The smp_mb__before_spinlock() primitive is free on many architectures.
(2) RELEASE operation implication: