aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Parri <[email protected]>2018-05-14 16:33:45 -0700
committerIngo Molnar <[email protected]>2018-05-15 08:11:16 +0200
commitbf8c6d963d16d40fbe70e94b61d9bf18c455fc6b (patch)
treee979685fee63eadc02aa3d361623f05c1ecaf378
parentbfd403bb3617e17a272e1189e5c76253052c22b8 (diff)
tools/memory-model: Model 'smp_store_mb()'
This commit models 'smp_store_mb(x, val);' to be semantically equivalent to 'WRITE_ONCE(x, val); smp_mb();'. Suggested-by: Paolo Bonzini <[email protected]> Suggested-by: Peter Zijlstra <[email protected]> Signed-off-by: Andrea Parri <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--tools/memory-model/linux-kernel.def1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/memory-model/linux-kernel.def b/tools/memory-model/linux-kernel.def
index 397e4e67e8c8..acf86f6f360a 100644
--- a/tools/memory-model/linux-kernel.def
+++ b/tools/memory-model/linux-kernel.def
@@ -14,6 +14,7 @@ smp_store_release(X,V) { __store{release}(*X,V); }
smp_load_acquire(X) __load{acquire}(*X)
rcu_assign_pointer(X,V) { __store{release}(X,V); }
rcu_dereference(X) __load{once}(X)
+smp_store_mb(X,V) { __store{once}(X,V); __fence{mb}; }
// Fences
smp_mb() { __fence{mb} ; }