]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
riscv: also select ARCH_KEEP_MEMBLOCK if kexec is selected
authorHan Gao <gaohan@iscas.ac.cn>
Tue, 19 May 2026 16:55:46 +0000 (00:55 +0800)
committerPaul Walmsley <pjw@kernel.org>
Sun, 7 Jun 2026 11:10:01 +0000 (05:10 -0600)
On RISC-V, also select ARCH_KEEP_MEMBLOCK if kexec is selected, not
only if ACPI is selected.  This is because kexec requires the memblock
areas to be kept after boot to initialize the secondary kernel.  This
is needed for both Device Tree and ACPI platforms.

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Link: https://patch.msgid.link/20260519165546.123105-1-gaohan@iscas.ac.cn
[pjw@kernel.org: change to add the dependency on kexec, rather than making it unconditional;
 rewrite the patch description accordingly]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
arch/riscv/Kconfig

index ce5f4342e2f25b938d30167fa8ac399ee68e181c..ca7dfbbefca072919e2f70b65c915cfe0c88f64f 100644 (file)
@@ -56,7 +56,7 @@ config RISCV
        select ARCH_HAS_UBSAN
        select ARCH_HAS_VDSO_ARCH_DATA if HAVE_GENERIC_VDSO
        select ARCH_HAVE_NMI_SAFE_CMPXCHG
-       select ARCH_KEEP_MEMBLOCK if ACPI
+       select ARCH_KEEP_MEMBLOCK if ACPI || KEXEC
        select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE if 64BIT && MMU
        select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
        select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT