[PATCH RFC 3/3] arm64: Add HOTPLUG_PARALLEL support for secondary CPUs

Michael Kelley mhklinux at outlook.com
Fri Jun 12 08:45:19 PDT 2026


From: Jinjie Ruan <ruanjinjie at huawei.com> Sent: Thursday, June 11, 2026 6:38 AM
> 
> Support for parallel secondary CPU bringup is already utilized by x86,
> MIPS, and RISC-V. This patch brings this capability to the arm64
> architecture.
> 
> Rework the global `secondary_data` accessed during early boot into
> a per-CPU array. This array maps logical CPU IDs to MPIDR_EL1 values,
> enabling the early boot code in head.S to resolve each secondary CPU's
> logical ID concurrently.
> 
> To fully enable HOTPLUG_PARALLEL, this patch implements:
> 1) An arm64-specific arch_cpuhp_kick_ap_alive() handler.
> 2) Callbacks to cpuhp_ap_sync_alive() inside secondary_start_kernel().
> 
> Successfully tested on QEMU ARM64 virt machine (KVM on, 128 vCPUs).
> 
> |     test kernel	   | secondary CPUs boot time |
> |  ---------------------   |	--------------------  |
> |   Without this patch     |		155.672	      |
> |   cpuhp.parallel=0	   |		62.897	      |
> |   cpuhp.parallel=1	   |		166.703	      |

The last two rows seem mixed up. I would expect parallel=0 to
result in a longer boot time.

Michael

> 
> Signed-off-by: Jinjie Ruan <ruanjinjie at huawei.com>
> ---
>  arch/arm64/Kconfig           |  1 +
>  arch/arm64/include/asm/smp.h |  8 ++++++++
>  arch/arm64/kernel/head.S     | 23 +++++++++++++++++++++++
>  arch/arm64/kernel/smp.c      | 27 +++++++++++++++++++++++++++
>  4 files changed, 59 insertions(+)
> 




More information about the linux-arm-kernel mailing list