Skip to content

arch: Introduce smp_load_acquire() and smp_store_release()

Peter Zijlstra linux-arch lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4doc: Rename LOCK/UNLOCK to ACQUIRE/RELEASEDocumentation/memory-barriers.txt+111 -1065 replies
2/4arch: Move smp_mb__{before,after}_atomic_{inc,dec}.h into asm/atomic.harch/arc/include/asm/atomic.h arch/arc/include/asm/barrier.h arch/hexagon/include/asm/atomic.h +1 more+10 -102 replies
3/4arch: Clean up asm/barrier.h implementations using asm-generic/barrier.harch/alpha/include/asm/barrier.h arch/arc/include/asm/Kbuild arch/avr32/include/asm/barrier.h +21 more+58 -4144 replies
4/4arch: Introduce smp_load_acquire(), smp_store_release()arch/arm/include/asm/barrier.h arch/arm64/include/asm/barrier.h arch/ia64/include/asm/barrier.h +8 more+234 -25 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchWill DeaconPaul E. McKenneyMathieu DesnoyersVineet Gupta
1/4R-b R-b A-b A-b
2/4R-b A-b
3/4R-b R-b R-b
4/4A-b A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 0/4] arch: Introduce smp_load_acquire() and smp_store_release()

These patches introduce 2 new barrier primitives:

smp_load_acquire(p)
smp_store_release(p, v)

See the first patch, which changes Documentation/memory-barriers.txt, to find the exact definitions of what an ACQUIRE/RELEASE barrier is -- previously known as LOCK/UNLOCK barriers.

The second patch moves the smp_mb__{before,after}_atomic_{dec,inc}() barriers to asm/atomic.h for arc and hexagon -- they were already there for all other archs.

This cleans up asm/barrier.h, and the third patch makes more agressive use of asm-generic/barrier.h to implement the simple cases.

Then the fourth patch adds the new primitives.

Previous versions were widely build tested -- this version is not, but it also not significantly different.

These patches apply to:

tip/master + lkml.kernel.org/r/[email protected]

---
Changes since the last version -- lkml.kernel.org/r/[email protected]

- rebased
- broke out the smp_mb__*atomic* movement
- changed the ia64 implementation to use volatile instead of actual ASM goo -- Tony, do let me know if you would prefer to have the ASM goo back; but given you said that gcc-ia64 generates the right instructions for volatile...