Skip to content

Fix issues with ARMv6+v6k+v7 kernels

Russell King - ARM Linux linux-arm-kernel linux-omap 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14ARM: bitops: ensure set/clear/change bitops take a word-aligned pointerarch/arm/lib/bitops.h+8 -03 replies
1/14ARM: bitops: ensure set/clear/change bitops take a word-aligned pointer+0 -01 reply
2/14ARM: bitops: switch set/clear/change bitops to use ldrex/strexarch/arm/include/asm/bitops.h arch/arm/kernel/armksyms.c arch/arm/lib/bitops.h +6 more+63 -1122 replies
2/14ARM: bitops: switch set/clear/change bitops to use ldrex/strex+0 -04 replies
2/14ARM: bitops: switch set/clear/change bitops to use ldrex/strex+0 -02 replies
2/14ARM: bitops: switch set/clear/change bitops to use ldrex/strex+0 -01 reply
2/14ARM: bitops: switch set/clear/change bitops to use ldrex/strex+0 -01 reply
2/14ARM: bitops: switch set/clear/change bitops to use ldrex/strex+0 -00 replies
2/14ARM: bitops: switch set/clear/change bitops to use ldrex/strex+0 -02 replies
3/14ARM: v6k: remove CPU_32v6K dependencies in asm/spinlock.harch/arm/include/asm/spinlock.h+25 -122 replies
3/14ARM: v6k: remove CPU_32v6K dependencies in asm/spinlock.h+0 -01 reply
3/14ARM: v6k: remove CPU_32v6K dependencies in asm/spinlock.h+0 -03 replies
3/14ARM: v6k: remove CPU_32v6K dependencies in asm/spinlock.h+0 -019 replies
3/14ARM: v6k: remove CPU_32v6K dependencies in asm/spinlock.h+0 -03 replies
4/14ARM: v6k: introduce CPU_V6K optionarch/arm/Kconfig arch/arm/Makefile arch/arm/boot/compressed/head.S +8 more+47 -313 replies
4/14ARM: v6k: introduce CPU_V6K option+0 -00 replies
4/14ARM: v6k: introduce CPU_V6K optionarch/arm/mm/Kconfig+1 -12 replies
5/14ARM: v6k: Realview EB 11MPCore and PB11MPCore use V6K architecture CPUsarch/arm/mach-realview/Kconfig+3 -20 replies
6/14ARM: v6k: Dove platforms use V6K architecture CPUsarch/arm/mach-dove/Kconfig arch/arm/mm/Kconfig+5 -31 reply
7/14ARM: v6k: select clear exclusive code seqences according to V6 variantsarch/arm/kernel/entry-header.S arch/arm/mm/abort-ev6.S+10 -101 reply
8/14ARM: v6k: select cmpxchg code sequences according to V6 variantsarch/arm/include/asm/system.h+9 -81 reply
9/14ARM: v6k: select generic atomic64 code according to V6 variantsarch/arm/Kconfig+1 -13 replies
10/14ARM: v6k: select TLS register code according to V6 variantsarch/arm/include/asm/tls.h+5 -62 replies
10/14ARM: v6k: select TLS register code according to V6 variants+0 -01 reply
10/14ARM: v6k: select TLS register code according to V6 variants+0 -01 reply
11/14ARM: v6k: use CPU domain feature if we include support for arch < ARMv6Karch/arm/mm/Kconfig+5 -23 replies
11/14ARM: v6k: use CPU domain feature if we include support for arch < ARMv6K+0 -01 reply
11/14ARM: v6k: use CPU domain feature if we include support for arch < ARMv6K+0 -01 reply
11/14ARM: v6k: use CPU domain feature if we include support for arch < ARMv6K+0 -01 reply
11/14ARM: v6k: use CPU domain feature if we include support for arch < ARMv6K+0 -01 reply
11/14ARM: v6k: use CPU domain feature if we include support for arch < ARMv6K+0 -02 replies
11/14ARM: v6k: use CPU domain feature if we include support for arch < ARMv6K+0 -00 replies
12/14ARM: v6k: do not disable CPU_32v6K based on platform selectionarch/arm/mm/Kconfig+3 -111 reply
13/14ARM: v6k: allow swp emulation again when ARMv7 is enabledarch/arm/mm/Kconfig+1 -11 reply
14/14ARM: v6k: only allow SMP if we have v6k or v7 CPUarch/arm/Kconfig+1 -01 reply

Reviews trailers per patch

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

PatchNicolas PitreTony LindgrenWill DeaconSourav PoddarDave Martin
SeriesA-b A-b
1/14T-b
1/14T-b
2/14R-b T-b T-b T-b T-b
2/14R-b T-b T-b T-b T-b
2/14R-b T-b T-b T-b T-b
2/14R-b T-b T-b T-b T-b
2/14R-b T-b T-b T-b T-b
2/14R-b T-b T-b T-b T-b
2/14R-b T-b T-b T-b T-b
3/14T-b T-b
3/14T-b T-b
3/14T-b T-b
3/14T-b T-b
3/14T-b T-b
4/14A-b A-b A-b
4/14A-b A-b A-b
4/14A-b A-b A-b
5/14
6/14T-b
7/14A-b
8/14A-b
9/14A-b A-b A-b
10/14A-b A-b
10/14A-b A-b
10/14A-b A-b
11/14A-b A-b
11/14A-b A-b
11/14A-b A-b
11/14A-b A-b
11/14A-b A-b
11/14A-b A-b
11/14A-b A-b
12/14T-b
13/14T-b
14/14A-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 5 reviewers.

Read the v1 thread

Cover letter [PATCH 00/14] Fix issues with ARMv6+v6k+v7 kernels

This patch series reworks the ARMv6/ARMv6K support options, code selection, and bit operations such that it's possible to safely build a kernel which supports ARMv6, ARMv6K, ARMv7 and ARMv7 SMP in one image.

Currently, we use CPU_V6 for both ARMv6 and ARMv6K, setting CPU_32v6K if we have the K extensions. CPU_32v6K directly controlled whether we should include the ARMv6K instructions (clrex, load/store exclusive byte, half-word, double). As the bitops code uses the load/store exclusive byte operations, unsetting CPU_32v6K results in these falling back to their non-SMP local-irq-disabling variants. These are only safe in uniprocessor environments.

So, the first two patches convert the bitops to use the ARMv6 load/store exclusive word operations - and ensuring correctness by ensuring that the pointer passed in is word-aligned.

We then introduce a new CPU_V6K which indicates that we're including an ARMv6K CPU in the build, which frees up CPU_V6 to mean that we're including an ARMv6 non-K CPU.

We can then use CPU_V6 to ensure that the non-v6K code paths which are still SMP safe are selected.

Without this patch set, such a kernel will be unsafe when run on SMP platforms as it omits necessary SMP code to ensure that bit operations are safe.