Skip to content

arm64: avoid out-of-line ll/sc atomics

Will Deacon linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v5 Latest10 patches 33 repliesIn review

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10jump_label: Don't warn on __exit jump entrieskernel/jump_label.c+3 -10 replies
2/10arm64: Use correct ll/sc atomic constraintsarch/arm64/include/asm/atomic_ll_sc.h+47 -420 replies
3/10arm64: atomics: avoid out-of-line ll/sc atomicsarch/arm64/include/asm/atomic.h arch/arm64/include/asm/atomic_arch.h arch/arm64/include/asm/atomic_ll_sc.h +3 more+329 -32814 replies
4/10arm64: avoid using hard-coded registers for LSE atomicsarch/arm64/include/asm/atomic_lse.h+41 -290 replies
5/10arm64: atomics: Remove atomic_ll_sc compilation unitarch/arm64/lib/Makefile arch/arm64/lib/atomic_ll_sc.c+0 -223 replies
6/10arm64: lse: Remove unused 'alt_lse' assembly macroarch/arm64/include/asm/lse.h+0 -221 reply
7/10arm64: asm: Kill 'asm/atomic_arch.h'arch/arm64/include/asm/atomic.h arch/arm64/include/asm/atomic_arch.h arch/arm64/include/asm/cmpxchg.h +1 more+140 -1571 reply
8/10arm64: lse: Make ARM64_LSE_ATOMICS depend on JUMP_LABELarch/arm64/Kconfig+1 -01 reply
9/10arm64: atomics: Undefine internal macros after usearch/arm64/include/asm/atomic.h arch/arm64/include/asm/cmpxchg.h+11 -01 reply
10/10arm64: atomics: Use K constraint when toolchain appears to support itarch/arm64/Makefile arch/arm64/include/asm/atomic_ll_sc.h+39 -1712 replies

Reviews trailers per patch

6 of 10 patches have a Reviewed-by or Acked-by.

PatchPeter Zijlstra (Intel)Mark RutlandAndrew Murray
1/10A-b A-b
2/10
3/10
4/10
5/10
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-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 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/10] arm64: avoid out-of-line ll/sc atomics

Hi all,

This is a version five of the patches previously posted by Andrew here:

v4: http://lkml.kernel.org/r/[email protected]

The reason I'm posting this is because I spotted an issue with the above when queuing it for 5.4 and fixing it ended up with me spinning a few patches on top.

The basic problem is that by implementing our atomic routines using a static key to select between the LL/SC and LSE variant, we rely on CONFIG_JUMP_LABEL and therefore CC_HAS_ASM_GOTO because otherwise the static key implementation itself is implementing using atomic routines, which leads to complete disaster.

This patch series builds on top of Andrew's patches, with the following changes:

* Tidying up the header files in preparation for...
* ...making LSE depend on JUMP_LABEL
* Support for the 'K' constraint when it looks like it works
* Minor massaging of commit logs

This means that LSE atomics are not available for in-kernel use when building with a version of clang without 'asm goto' support. I really don't see a way around this, but I've been told that clang-9 should have this support so that's at least something.

Will

--->8

Andrew Murray (5):
jump_label: Don't warn on __exit jump entries
arm64: Use correct ll/sc atomic constraints
arm64: atomics: avoid out-of-line ll/sc atomics
arm64: avoid using hard-coded registers for LSE atomics
arm64: atomics: Remove atomic_ll_sc compilation unit

Will Deacon (5):
arm64: lse: Remove unused 'alt_lse' assembly macro
arm64: asm: Kill 'asm/atomic_arch.h'
arm64: lse: Make ARM64_LSE_ATOMICS depend on JUMP_LABEL
arm64: atomics: Undefine internal macros after use
arm64: atomics: Use K constraint when toolchain appears to support it

 arch/arm64/Kconfig                    |   1 +
 arch/arm64/Makefile                   |   9 +-
 arch/arm64/include/asm/atomic.h       |  93 +++++++-
 arch/arm64/include/asm/atomic_ll_sc.h | 215 +++++++++---------
 arch/arm64/include/asm/atomic_lse.h   | 395 ++++++++++++----------------------
 arch/arm64/include/asm/cmpxchg.h      |  45 +++-
 arch/arm64/include/asm/lse.h          |  49 ++---
 arch/arm64/lib/Makefile               |  19 --
 arch/arm64/lib/atomic_ll_sc.c         |   3 -
 kernel/jump_label.c                   |   4 +-
 10 files changed, 413 insertions(+), 420 deletions(-)
 delete mode 100644 arch/arm64/lib/atomic_ll_sc.c
Signature · 7 lines
2.11.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel