CM5/Pi5: CPU hotplug broken - CPU_ON fails after CPU_OFF (PSCI)

Open
#7,291 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
c, linux, raspberry-pi

Research direction

Start by reproducing the failure with /sys/devices/system/cpu/cpu1/online and capture the dmesg messages shown. Read the kernel's PSCI CPU_OFF and CPU_ON handling and the CPU hotplug path, then compare behavior after a cold boot and kexec. Done means CPU1 can be taken offline and brought online again without -22, including in the reported kexec case.

Written by the indexing model from the issue text.

Description

Describe the bug

Description:

  • After taking a CPU offline via /sys/devices/system/cpu/cpuN/online
  • Bringing it back online fails with error -22
  • dmesg shows: "psci: failed to boot CPU1 (-22)"
  • Same failure occurs after kexec when target kernel tries CPU_ON
  • Only cold boot resets the PSCI state machine

Impact:

  • CPU hotplug is non-functional
  • kexec to new kernel fails to bring up secondary CPUs

Hardware: Raspberry Pi CM5

Steps to reproduce the behaviour

on root shell, do:
echo 0>/sys/devices/system/cpu/cpu1/online
echo 1>/sys/devices/system/cpu/cpu1/online

Device (s)

Raspberry Pi CM5 Lite

System

(! 518)-> cat /etc/rpi-issue
Raspberry Pi reference 2025-12-04
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 4997bf4e4e49bc3305eb182a4a08bd023529da04, stage4

(! 519)-> vcgencmd version
2025/12/08 19:29:54
Copyright (c) 2012 Broadcom
version 2226a853 (release) (embedded)

(! 520)-> uname -a
Linux scorscion 6.12.75+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1 (2026-03-11) aarch64 GNU/Linux

Logs

[ 1654.502987] psci: CPU1 killed (polled 0 ms)
[ 1677.441585] CPU1: failed to come online
[ 1677.445450] CPU1: failed in unknown state : 0x0
[ 1772.549796] psci: failed to boot CPU1 (-22)
[ 1772.549806] CPU1: failed to boot: -22

Additional context

No response

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.