diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-03-24 18:24:11 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-03-24 18:24:11 -0700 |
| commit | 72b40807d21cc5d7d8e48bfa860d5d78769dc07a (patch) | |
| tree | 7bdd25b23995d9aa3cc2754a66c2da42b3643376 /tools/memory-model/linux-kernel.cat | |
| parent | Merge tag 'nolibc-20250308-for-6.15-1' of git://git.kernel.org/pub/scm/linux/... (diff) | |
| parent | tools/memory-model: glossary.txt: Fix indents (diff) | |
| download | linux-72b40807d21cc5d7d8e48bfa860d5d78769dc07a.tar.gz linux-72b40807d21cc5d7d8e48bfa860d5d78769dc07a.zip | |
Merge tag 'lkmm.2025.03.21a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu
Pull kernel memory model updates from Paul McKenney:
"Add more atomic operations, rework tags, and update documentation:
- Add additional atomic operations (Puranjay Mohan)
- Make better use of herd7 tags (Jonas Oberhauser)
- Update documentation (Akira Yokosawa)
These changes require v7.58 of the herd7 and klitmus tools, up from
v7.52"
* tag 'lkmm.2025.03.21a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
tools/memory-model: glossary.txt: Fix indents
tools/memory-model/README: Fix typo
tools/memory-model: Distinguish between syntactic and semantic tags
tools/memory-model: Switch to softcoded herd7 tags
tools/memory-model: Define effect of Mb tags on RMWs in tools/...
tools/memory-model: Define applicable tags on operation in tools/...
tools/memory-model: Legitimize current use of tags in LKMM macros
tools/memory-model: Add atomic_andnot() with its variants
tools/memory-model: Add atomic_and()/or()/xor() and add_negative
Diffstat (limited to 'tools/memory-model/linux-kernel.cat')
| -rw-r--r-- | tools/memory-model/linux-kernel.cat | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/memory-model/linux-kernel.cat b/tools/memory-model/linux-kernel.cat index adf3c4f41229..d7e7bf13c831 100644 --- a/tools/memory-model/linux-kernel.cat +++ b/tools/memory-model/linux-kernel.cat @@ -34,6 +34,16 @@ let R4rmb = R \ Noreturn (* Reads for which rmb works *) let rmb = [R4rmb] ; fencerel(Rmb) ; [R4rmb] let wmb = [W] ; fencerel(Wmb) ; [W] let mb = ([M] ; fencerel(Mb) ; [M]) | + (* + * full-barrier RMWs (successful cmpxchg(), xchg(), etc.) act as + * though there were enclosed by smp_mb(). + * The effect of these virtual smp_mb() is formalized by adding + * Mb tags to the read and write of the operation, and providing + * the same ordering as though there were additional po edges + * between the Mb tag and the read resp. write. + *) + ([M] ; po ; [Mb & R]) | + ([Mb & W] ; po ; [M]) | ([M] ; fencerel(Before-atomic) ; [RMW] ; po? ; [M]) | ([M] ; po? ; [RMW] ; fencerel(After-atomic) ; [M]) | ([M] ; po? ; [LKW] ; fencerel(After-spinlock) ; [M]) | |
