Skip to content

arch: Provide atomic logic ops

Peter Zijlstra linux-arch lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest28 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/28atomic: Prepare generic atomic implementation for logic opsinclude/asm-generic/atomic.h+10 -20 replies
2/28alpha: Provide atomic_{or,xor,and}arch/alpha/include/asm/atomic.h+28 -150 replies
3/28arc: Provide atomic_{or,xor,and}arch/arc/include/asm/atomic.h+17 -20 replies
4/28arm: Provide atomic_{or,xor,and}arch/arm/include/asm/atomic.h+15 -00 replies
5/28arm64: Provide atomic_{or,xor,and}arch/arm64/include/asm/atomic.h+15 -00 replies
6/28avr32: Provide atomic_{or,xor,and}arch/avr32/include/asm/atomic.h+14 -00 replies
7/28blackfin: Provide atomic_{or,xor,and}arch/blackfin/include/asm/atomic.h arch/blackfin/kernel/bfin_ksyms.c arch/blackfin/mach-bf561/atomic.S+40 -250 replies
8/28hexagon: Provide atomic_{or,xor,and}arch/hexagon/include/asm/atomic.h+6 -00 replies
9/28ia64: Provide atomic_{or,xor,and}arch/ia64/include/asm/atomic.h+22 -40 replies
10/28m32r: Provide atomic_{or,xor,and}arch/m32r/include/asm/atomic.h+10 -340 replies
11/28m68k: Provide atomic_{or,xor,and}arch/m68k/include/asm/atomic.h+10 -40 replies
12/28metag: Provide atomic_{or,xor,and}arch/metag/include/asm/atomic_lnkget.h arch/metag/include/asm/atomic_lock1.h+17 -420 replies
13/28mips: Provide atomic_{or,xor,and}arch/mips/include/asm/atomic.h+9 -00 replies
14/28mn10300: Provide atomic_{or,xor,and}arch/mn10300/include/asm/atomic.h+10 -470 replies
15/28parisc: Provide atomic_{or,xor,and}arch/parisc/include/asm/atomic.h+9 -00 replies
16/28powerpc: Provide atomic_{or,xor,and}arch/powerpc/include/asm/atomic.h+9 -00 replies
17/28sh: Provide atomic_{or,xor,and}arch/sh/include/asm/atomic-grb.h arch/sh/include/asm/atomic-irq.h arch/sh/include/asm/atomic-llsc.h +1 more+22 -850 replies
18/28sparc: Provide atomic_{or,xor,and}arch/sparc/include/asm/atomic_32.h arch/sparc/include/asm/atomic_64.h arch/sparc/lib/atomic32.c +2 more+38 -30 replies
19/28xtensa: Provide atomic_{or,xor,and}arch/xtensa/include/asm/atomic.h+16 -690 replies
20/28s390: Provide atomic_{or,xor,and}arch/s390/include/asm/atomic.h+33 -140 replies
21/28x86: Provide atomic_{or,xor,and}arch/x86/include/asm/atomic.h arch/x86/include/asm/atomic64_32.h arch/x86/include/asm/atomic64_64.h+55 -90 replies
22/28frv: Rewrite atomic implementationarch/frv/include/asm/atomic.h arch/frv/include/asm/atomic_defs.h arch/frv/include/asm/bitops.h +6 more+259 -3550 replies
23/28h8300: Provide atomic_{or,xor,and}arch/h8300/include/asm/atomic.h+46 -1010 replies
24/28tile: Provide atomic_{or,xor,and}arch/tile/include/asm/atomic_32.h arch/tile/include/asm/atomic_64.h arch/tile/lib/atomic_32.c +1 more+99 -00 replies
25/28atomic: Provide atomic_{or,xor,and}arch/alpha/include/asm/atomic.h arch/arc/include/asm/atomic.h arch/arm/include/asm/atomic.h +26 more+19 -680 replies
26/28atomic: Collapse all atomic_{set,clear}_mask definitionsarch/arc/include/asm/atomic.h arch/blackfin/include/asm/atomic.h arch/frv/include/asm/atomic.h +13 more+25 -1740 replies
27/28atomic: Replace atomic_{set,clear}_mask() usagearch/blackfin/mach-common/smp.c arch/m32r/kernel/smp.c arch/mn10300/mm/tlb-smp.c +11 more+97 -970 replies
28/28atomic: Add simple atomic_t testslib/atomic64_test.c+47 -210 replies

Reviews trailers per patch

6 of 28 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGeert UytterhoevenRalf BaechleBenjamin HerrenschmidtDavid S. MillerHeiko CarstensVineet GuptaWill DeaconRichard Kuo
SeriesA-b A-b
1/28
2/28
3/28A-b
4/28
5/28
6/28
7/28
8/28
9/28
10/28
11/28A-b
12/28
13/28A-b
14/28
15/28
16/28A-b
17/28
18/28A-b
19/28
20/28A-b
21/28
22/28
23/28
24/28
25/28
26/28
27/28
28/28

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

Read the v1 thread

Cover letter [PATCH 00/28] arch: Provide atomic logic ops

Currently there is an incoherent mess of atomic_{set,clear}_mask() and atomic_or() (but no atomic_{and,nand,xor}()) in the tree.

Those archs that implement atomic_{set,clear}_mask() are not even consistent on its signature.

Implement atomic_{or,and,xor}() on all archs and deprecate atomic_{set,clear}_mask().

The series has been compile tested by the build-bot, no known failures at this time.

I would like to take this through tip; I'll ask Ingo to put it in a separate branch such that people can pull in that branch if there is conflicting work elsewhere (Will has some for Argh64).

Changes since lst time:

- Quite a few build fails fixed, most notable would be that each arch now defines CONFIG_ARCH_HAS_ATOMIC_OR for a little while -- we take it out again later.

- FRV has some extra magic that allows the inline assembly to correctly work as inline functions.

- TILE patch contributed by Chris -- Thanks!

- A little extention to lib/atomic64_test.c that compile tests the new primitives.

- Alpha, fixed ASM due to fallout from actually trying to compile things.

- H8300, somehow I had overlooked it previously.

- Added atomic_andnot() to a few archs that have that instruction to test that.