diff --git a/tools/memory-model/Documentation/cheatsheet.txt b/tools/memory-model/Documentation/cheatsheet.txt index 04e458acd6d4dfbd8aef24025ceb484fb0297a4d..956b1ae4aafbb2ea622d1aebfe94f0c7001a960e 100644 --- a/tools/memory-model/Documentation/cheatsheet.txt +++ b/tools/memory-model/Documentation/cheatsheet.txt @@ -1,11 +1,11 @@ Prior Operation Subsequent Operation --------------- --------------------------- C Self R W RWM Self R W DR DW RMW SV - __ ---- - - --- ---- - - -- -- --- -- + -- ---- - - --- ---- - - -- -- --- -- Store, e.g., WRITE_ONCE() Y Y -Load, e.g., READ_ONCE() Y Y Y -Unsuccessful RMW operation Y Y Y +Load, e.g., READ_ONCE() Y Y Y Y +Unsuccessful RMW operation Y Y Y Y rcu_dereference() Y Y Y Y Successful *_acquire() R Y Y Y Y Y Y Successful *_release() C Y Y Y W Y diff --git a/tools/memory-model/Documentation/explanation.txt b/tools/memory-model/Documentation/explanation.txt index dae8b8cb2ad36b269ba1af582215b946172b3156..a727c82bd434f51aded17198b9abf08d0de622a2 100644 --- a/tools/memory-model/Documentation/explanation.txt +++ b/tools/memory-model/Documentation/explanation.txt @@ -826,7 +826,7 @@ A-cumulative; they only affect the propagation of stores that are executed on C before the fence (i.e., those which precede the fence in program order). -read_lock(), rcu_read_unlock(), and synchronize_rcu() fences have +rcu_read_lock(), rcu_read_unlock(), and synchronize_rcu() fences have other properties which we discuss later. @@ -1138,7 +1138,7 @@ final effect is that even though the two loads really are executed in program order, it appears that they aren't. This could not have happened if the local cache had processed the -incoming stores in FIFO order. In constrast, other architectures +incoming stores in FIFO order. By contrast, other architectures maintain at least the appearance of FIFO order. In practice, this difficulty is solved by inserting a special fence diff --git a/tools/memory-model/linux-kernel.def b/tools/memory-model/linux-kernel.def index 5dfb9c7f34621bd76db81d48151a542928b9d179..397e4e67e8c849e98726d5a4f3a716264dd02ed6 100644 --- a/tools/memory-model/linux-kernel.def +++ b/tools/memory-model/linux-kernel.def @@ -13,7 +13,7 @@ WRITE_ONCE(X,V) { __store{once}(X,V); } 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{deref}(X) +rcu_dereference(X) __load{once}(X) // Fences smp_mb() { __fence{mb} ; }