diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2018-05-14 19:33:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-05-15 02:11:18 -0400 |
commit | cee0321a404fe6b43d1f4364639c8ffe2f2b37d1 (patch) | |
tree | ebedf8abb645eb35115616d4677c3795a0c24307 | |
parent | 30b795df11a1a9dd7fc50c1ff4677343b67cb379 (diff) |
tools/memory-model: Remove out-of-date comments and code from lock.cat
lock.cat contains old comments and code referring to the possibility
of LKR events that are not part of an RMW pair. This is a holdover
from when I though we might end up using LKR events to implement
spin_is_locked(). Reword the comments to remove this assumption and
replace domain(lk-rmw) in the code with LKR.
Tested-by: Andrea Parri <andrea.parri@amarulasolutions.com>
[ paulmck: Pulled as lock-nest into previous line as discussed. ]
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Akira Yokosawa <akiyks@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jade Alglave <j.alglave@ucl.ac.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luc Maranget <luc.maranget@inria.fr>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arch@vger.kernel.org
Cc: parri.andrea@gmail.com
Link: http://lkml.kernel.org/r/1526340837-12222-15-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | tools/memory-model/lock.cat | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tools/memory-model/lock.cat b/tools/memory-model/lock.cat index 7217cd4941a4..cd002a33ca8a 100644 --- a/tools/memory-model/lock.cat +++ b/tools/memory-model/lock.cat | |||
@@ -47,18 +47,15 @@ flag ~empty [M \ IW] ; loc ; [ALL-LOCKS] as mixed-lock-accesses | |||
47 | let lk-rmw = ([LKR] ; po-loc ; [LKW]) \ (po ; po) | 47 | let lk-rmw = ([LKR] ; po-loc ; [LKW]) \ (po ; po) |
48 | let rmw = rmw | lk-rmw | 48 | let rmw = rmw | lk-rmw |
49 | 49 | ||
50 | (* The litmus test is invalid if an LKR/LKW event is not part of an RMW pair *) | ||
51 | flag ~empty LKW \ range(lk-rmw) as unpaired-LKW | ||
52 | flag ~empty LKR \ domain(lk-rmw) as unpaired-LKR | ||
53 | |||
50 | (* | 54 | (* |
51 | * A paired LKR must always see an unlocked value; spin_lock() calls nested | 55 | * An LKR must always see an unlocked value; spin_lock() calls nested |
52 | * inside a critical section (for the same lock) always deadlock. | 56 | * inside a critical section (for the same lock) always deadlock. |
53 | *) | 57 | *) |
54 | empty ([LKW] ; po-loc ; [domain(lk-rmw)]) \ (po-loc ; [UL] ; po-loc) | 58 | empty ([LKW] ; po-loc ; [LKR]) \ (po-loc ; [UL] ; po-loc) as lock-nest |
55 | as lock-nest | ||
56 | |||
57 | (* The litmus test is invalid if an LKW event is not part of an RMW pair *) | ||
58 | flag ~empty LKW \ range(lk-rmw) as unpaired-LKW | ||
59 | |||
60 | (* This will be allowed if we implement spin_is_locked() *) | ||
61 | flag ~empty LKR \ domain(lk-rmw) as unpaired-LKR | ||
62 | 59 | ||
63 | (* The final value of a spinlock should not be tested *) | 60 | (* The final value of a spinlock should not be tested *) |
64 | flag ~empty [FW] ; loc ; [ALL-LOCKS] as lock-final | 61 | flag ~empty [FW] ; loc ; [ALL-LOCKS] as lock-final |