Skip to content
Snippets Groups Projects
Commit 93bde3aa authored by Jonas Oberhauser's avatar Jonas Oberhauser Committed by Paul E. McKenney
Browse files

tools/memory-model: Define applicable tags on operation in tools/...


Herd7 transforms reads, writes, and read-modify-writes by eliminating
'acquire tags from writes, 'release tags from reads, and 'acquire,
'release, and 'mb tags from failed read-modify-writes. We emulate this
behavior by redefining Acquire, Release, and Mb sets in linux-kernel.bell
to explicitly exclude those combinations.

Herd7 furthermore adds 'noreturn tag to certain reads. Currently herd7
does not allow specifying the 'noreturn tag manually, but such manual
declaration (e.g., through a syntax __atomic_op{noreturn}) would add
invalid 'noreturn tags to writes; in preparation, we already also exclude
this combination.

Signed-off-by: default avatarJonas Oberhauser <jonas.oberhauser@huaweicloud.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Reviewed-by: default avatarBoqun Feng <boqun.feng@gmail.com>
Tested-by: default avatarBoqun Feng <boqun.feng@gmail.com>
parent 49fa7fd8
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,17 @@ enum Barriers = 'wmb (*smp_wmb*) ||
'after-srcu-read-unlock (*smp_mb__after_srcu_read_unlock*)
instructions F[Barriers]
(*
* Filter out syntactic annotations that do not provide the corresponding
* semantic ordering, such as Acquire on a store or Mb on a failed RMW.
*)
let FailedRMW = RMW \ (domain(rmw) | range(rmw))
let Acquire = Acquire \ W \ FailedRMW
let Release = Release \ R \ FailedRMW
let Mb = Mb \ FailedRMW
let Noreturn = Noreturn \ W
(* SRCU *)
enum SRCU = 'srcu-lock || 'srcu-unlock || 'sync-srcu
instructions SRCU[SRCU]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment