[RFC PATCH 2/3] riscv: kexec: Select HOTPLUG_CPU for KEXEC_FILE

From: Xie Bo

Date: Tue Jul 21 2026 - 04:00:55 EST


RISC-V machine_shutdown() uses CPU hotplug to offline secondary harts
before handing control to the next kernel. ARCH_SELECTS_KEXEC selects
HOTPLUG_CPU for SMP, but the KEXEC_FILE-only configuration does not.

Select HOTPLUG_CPU from ARCH_SELECTS_KEXEC_FILE as well so both loading
interfaces use the same shutdown guarantee.

Signed-off-by: Xie Bo <xb@xxxxxxxxxxxxx>
---
arch/riscv/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index f7028ca..55e94e2 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -1097,6 +1097,7 @@ config ARCH_SUPPORTS_KEXEC_FILE
config ARCH_SELECTS_KEXEC_FILE
def_bool y
depends on KEXEC_FILE
+ select HOTPLUG_CPU if SMP
select HAVE_IMA_KEXEC if IMA
select KEXEC_ELF

--
2.17.1