tools/memory-model: Switch to softcoded herd7 tags
authorJonas Oberhauser <jonas.oberhauser@huaweicloud.com>
Mon, 30 Sep 2024 10:57:09 +0000 (12:57 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 25 Feb 2025 18:16:57 +0000 (10:16 -0800)
commitfafa180683591f5f917bfa68e95aae463afc852a
treee8401ed5a3804c81b07416bd0241acba8a0dc2dd
parent29279349a566232057f52392d1a8af91772de7e1
tools/memory-model: Switch to softcoded herd7 tags

A new version of herd7 provides a -lkmmv2 switch which overrides the old herd7
behavior of simply ignoring any softcoded tags in the .def and .bell files. We
port LKMM to this version of herd7 by providing the switch in linux-kernel.cfg
and reporting an error if the LKMM is used without this switch.

To preserve the semantics of LKMM, we also softcode the Noreturn tag on atomic
RMW which do not return a value and define atomic_add_unless with an Mb tag in
linux-kernel.def.

We update the herd-representation.txt accordingly and clarify some of the
resulting combinations.

Co-developed-by: Hernan Ponce de Leon <hernan.poncedeleon@huaweicloud.com>
Signed-off-by: Hernan Ponce de Leon <hernan.poncedeleon@huaweicloud.com>
Signed-off-by: Jonas Oberhauser <jonas.oberhauser@huaweicloud.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Tested-by: Boqun Feng <boqun.feng@gmail.com>
Tested-by: Akira Yokosawa <akiyks@gmail.com> # herdtools7.7.58
tools/memory-model/Documentation/herd-representation.txt
tools/memory-model/README
tools/memory-model/linux-kernel.bell
tools/memory-model/linux-kernel.cfg
tools/memory-model/linux-kernel.def