From: Alan Stern Date: Thu, 20 Jun 2019 15:55:36 +0000 (-0400) Subject: tools/memory-model: Expand definition of barrier X-Git-Tag: v5.3-rc1~204^2^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f9de417121001879d92a86960647adb06b5b81bf;p=thirdparty%2Flinux.git tools/memory-model: Expand definition of barrier Commit 66be4e66a7f4 ("rcu: locking and unlocking need to always be at least barriers") added compiler barriers back into rcu_read_lock() and rcu_read_unlock(). Furthermore, srcu_read_lock() and srcu_read_unlock() have always contained compiler barriers. The Linux Kernel Memory Model ought to know about these barriers. This patch adds them into the memory model. Signed-off-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney --- diff --git a/tools/memory-model/linux-kernel.cat b/tools/memory-model/linux-kernel.cat index 36d367054811f..8b61218c99fd9 100644 --- a/tools/memory-model/linux-kernel.cat +++ b/tools/memory-model/linux-kernel.cat @@ -45,7 +45,8 @@ let strong-fence = mb | gp let nonrw-fence = strong-fence | po-rel | acq-po let fence = nonrw-fence | wmb | rmb let barrier = fencerel(Barrier | Rmb | Wmb | Mb | Sync-rcu | Sync-srcu | - Before-atomic | After-atomic | Acquire | Release) | + Before-atomic | After-atomic | Acquire | Release | + Rcu-lock | Rcu-unlock | Srcu-lock | Srcu-unlock) | (po ; [Release]) | ([Acquire] ; po) (**********************************)