diff options
| author | Karl Mehltretter <kmehltretter@gmail.com> | 2026-08-08 22:08:26 +0100 |
|---|---|---|
| committer | Russell King <rmk+kernel@armlinux.org.uk> | 2026-10-14 17:19:47 +0100 |
| commit | f6e551e7d515579b952422c93415470fb672d848 (patch) | |
| tree | 3b9f54163a080b81d96616a7ffb567baff8ba765 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 787a3446cafee59e31deaec662d74f86bff38999 (diff) | |
ARM: 9488/1: smp: set current pointer in assembly before jumping into C
With CONFIG_KCOV_INSTRUMENT_ALL=y, secondary CPUs fail to come online
on ARMv6K/ARMv7 SMP:
CPU1: failed to boot: -38
The compiler inserts a call to __sanitizer_cov_trace_pc() at the entry
of secondary_start_kernel(), before set_current(task). The KCOV hook
dereferences current while TPIDRURO is still uninitialized, causing a
data abort before cpu_init() has installed the exception stacks. The
secondary CPU consequently never completes startup.
Initialize current in the secondary assembly handoff, as
__mmap_switched already does for the boot CPU.
With current set in assembly, the set_current() call in
secondary_start_kernel() is redundant. Drop it together with the
function and the task argument. The hotplug resuscitate path in
arch_cpu_idle_dead() needs no hand-off either, as smp_ops.cpu_die()
can only return if the CPU kept its register state, TPIDRURO included.
Assisted-by: Claude:claude-fable-5
Fixes: 50596b7559bf ("ARM: smp: Store current pointer in TPIDRURO register if available")
Cc: stable@vger.kernel.org
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
