This series moves ARM cacheinfo allocation to the boot CPU to avoid
sleeping-lock warnings during PREEMPT_RT secondary-CPU startup. It is
based on 5225b8eec4c9 (7.3-rc2 plus one day).
Patches 1-3 prepare for early allocation: bound cache-leaf writes,
include external caches in the allocation size, and guard CLIDR reads
on older CPUs. Patch 4 enables early allocation. Please take all four
patches together for stable.
Tested on QEMU virt (Cortex-A15), vexpress-a9 (Cortex-A9 with PL310),
and realview-eb-mpcore (ARM11 MPCore) with PREEMPT_RT, plus non-RT
virt and vexpress-a9 builds. Cache sysfs output is unchanged for the
normal platform DTs, and CPU hotplug passes where supported. Additional
checks cover DT leaf undercounting with KASAN and ARM11 DT cache
descriptions.
The full series also passes on a Raspberry Pi 400 with a 32-bit
PREEMPT_RT 7.2.6-rc1 kernel: the boot warning is absent and all 12 cache
sysfs entries match the baseline. CPU hotplug is unavailable there.
The series applies unchanged to 7.2.6-rc1 and v6.18.
Karl Mehltretter (4):
ARM: cacheinfo: avoid out-of-bounds write in populate_cache_leaves()
ARM: cacheinfo: count external caches in early_cache_level()
ARM: cacheinfo: guard the CLIDR read in populate_cache_leaves()
ARM: topology: allocate the cacheinfo early on the boot CPU
arch/arm/kernel/cacheinfo.c | 49 +++++++++++++++++++------------------
arch/arm/kernel/topology.c | 13 ++++++++++
2 files changed, 38 insertions(+), 24 deletions(-)
--
2.53.0