riscv: unconditionally select ARCH_KEEP_MEMBLOCK
PATCH 1/1 riscv: unconditionally select ARCH_KEEP_MEMBLOCK
Select ARCH_KEEP_MEMBLOCK unconditionally. kexec requires memblock to be kept after boot to initialize the secondary kernel. Device Tree platforms also need this for kexec support.
--- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/Kconfig +1 -1
@@ -55,7 +55,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 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
Signature · 1 line
2.47.3
Paul Walmsley
maintainerQuoted 5 lines · Han Gao
Select
ARCH_KEEP_MEMBLOCKunconditionally. kexec requires memblock to be kept after boot to initialize the secondary kernel. Device Tree platforms also need this for kexec support.Signed-off-by Han Gao <[email protected]>
Thanks for the patch. If this patch is just about kexec, shouldn't ARCH_SELECTS_KEXEC just be changed to select ARCH_KEEP_MEMBLOCK?
- Paul
Quoted 11 lines · Paul Walmsley
Quoted 5 lines · Han Gao
Select
ARCH_KEEP_MEMBLOCKunconditionally. kexec requires memblock to be kept after boot to initialize the secondary kernel. Device Tree platforms also need this for kexec support.Signed-off-by Han Gao <[email protected]>Thanks for the patch. If this patch is just about kexec, shouldn't
ARCH_SELECTS_KEXECjust be changed to selectARCH_KEEP_MEMBLOCK?
It's currently aligned with the arm64 architecture. If so, should we modify it accordingly?
Quoted 3 lines
- Paul
Paul Walmsley
maintainerQuoted 8 lines · Han Gao
Quoted 7 lines · Paul Walmsley
Quoted 4 lines · Han Gao
Select
ARCH_KEEP_MEMBLOCKunconditionally. kexec requires memblock to be kept after boot to initialize the secondary kernel. Device Tree platforms also need this for kexec support.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Han Gao <[email protected]>Thanks for the patch. If this patch is just about kexec, shouldn't
ARCH_SELECTS_KEXECjust be changed to selectARCH_KEEP_MEMBLOCK?It's currently aligned with the arm64 architecture. If so, should we modify it accordingly?
If the motivation for adding it this way is to match arm64, then the patch description would need to be updated accordingly; it doesn't say anything about that. I'm not sure that's a sufficient rationale, on its own.
On the other hand, if the rationale for this change is that it fixes an issue when kexec is used, then I guess I don't understand why we wouldn't make it dependent on ARCH_SELECTS_KEXEC? It can always be patched again if more use cases are discovered, right?
- Paul