[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1526340837-12222-15-git-send-email-paulmck@linux.vnet.ibm.com>
Date: Mon, 14 May 2018 16:33:53 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
mingo@...nel.org
Cc: stern@...land.harvard.edu, parri.andrea@...il.com,
will.deacon@....com, peterz@...radead.org, boqun.feng@...il.com,
npiggin@...il.com, dhowells@...hat.com, j.alglave@....ac.uk,
luc.maranget@...ia.fr, akiyks@...il.com,
Andrea Parri <andrea.parri@...rulasolutions.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: [PATCH memory-model 15/19] tools/memory-model: Remove out-of-date comments and code from lock.cat
From: Alan Stern <stern@...land.harvard.edu>
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.
Signed-off-by: Alan Stern <stern@...land.harvard.edu>
CC: Akira Yokosawa <akiyks@...il.com>
CC: Andrea Parri <andrea.parri@...rulasolutions.com>
CC: Boqun Feng <boqun.feng@...il.com>
CC: David Howells <dhowells@...hat.com>
CC: Jade Alglave <j.alglave@....ac.uk>
CC: Luc Maranget <luc.maranget@...ia.fr>
CC: Nicholas Piggin <npiggin@...il.com>
CC: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
CC: Peter Zijlstra <peterz@...radead.org>
CC: Will Deacon <will.deacon@....com>
Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Tested-by: Andrea Parri <andrea.parri@...rulasolutions.com>
[ paulmck: Pulled "as lock-nest" into previous line as discussed. ]
---
tools/memory-model/lock.cat | 15 ++++++---------
1 file 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
let lk-rmw = ([LKR] ; po-loc ; [LKW]) \ (po ; po)
let rmw = rmw | lk-rmw
+(* The litmus test is invalid if an LKR/LKW event is not part of an RMW pair *)
+flag ~empty LKW \ range(lk-rmw) as unpaired-LKW
+flag ~empty LKR \ domain(lk-rmw) as unpaired-LKR
+
(*
- * A paired LKR must always see an unlocked value; spin_lock() calls nested
+ * An LKR must always see an unlocked value; spin_lock() calls nested
* inside a critical section (for the same lock) always deadlock.
*)
-empty ([LKW] ; po-loc ; [domain(lk-rmw)]) \ (po-loc ; [UL] ; po-loc)
- as lock-nest
-
-(* The litmus test is invalid if an LKW event is not part of an RMW pair *)
-flag ~empty LKW \ range(lk-rmw) as unpaired-LKW
-
-(* This will be allowed if we implement spin_is_locked() *)
-flag ~empty LKR \ domain(lk-rmw) as unpaired-LKR
+empty ([LKW] ; po-loc ; [LKR]) \ (po-loc ; [UL] ; po-loc) as lock-nest
(* The final value of a spinlock should not be tested *)
flag ~empty [FW] ; loc ; [ALL-LOCKS] as lock-final
--
2.5.2
Powered by blists - more mailing lists