mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xie Bo <xb@ultrarisc.com>
To: linux-riscv@lists.infradead.org
Cc: pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
	alex@ghiti.fr, linux-kernel@vger.kernel.org,
	Xie Bo <xb@ultrarisc.com>
Subject: [RFC PATCH 2/3] riscv: kexec: Select HOTPLUG_CPU for KEXEC_FILE
Date: Tue, 21 Jul 2026 15:58:11 +0800	[thread overview]
Message-ID: <20260721075812.82708-3-xb@ultrarisc.com> (raw)
In-Reply-To: <20260721075812.82708-1-xb@ultrarisc.com>

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@ultrarisc.com>
---
 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


  parent reply	other threads:[~2026-07-21  7:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21  7:58 [RFC PATCH 0/3] riscv: Add supervisor pointer masking infrastructure Xie Bo
2026-07-21  7:58 ` [RFC PATCH 1/3] riscv: sbi: Add FWFT get helper Xie Bo
2026-07-21  7:58 ` Xie Bo [this message]
2026-07-21  7:58 ` [RFC PATCH 3/3] riscv: Add supervisor pointer masking control Xie Bo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260721075812.82708-3-xb@ultrarisc.com \
    --to=xb@ultrarisc.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®