Skip to contentSkip to conversation

riscv: unconditionally select ARCH_KEEP_MEMBLOCK

PATCH In review Han Gao 3 participants 4 messages May 19 – May 28 RISC-V

lore
Share & tools
lore

Han Gao

author
#0 lore raw

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
index c5754942cf85..e2a052257176 100644
@@ -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
maintainer
#1 lore raw
Quoted 5 lines · Han Gao

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.

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

#2 lore raw
Quoted 11 lines · Paul Walmsley
Quoted 5 lines · Han Gao

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.

Thanks for the patch. If this patch is just about kexec, shouldn't ARCH_SELECTS_KEXEC just be changed to select ARCH_KEEP_MEMBLOCK?

It's currently aligned with the arm64 architecture. If so, should we modify it accordingly?

Quoted 3 lines

- Paul

maintainer
#3 lore raw
Quoted 8 lines · Han Gao
Quoted 7 lines · Paul Walmsley
Quoted 4 lines · Han Gao

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.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Thanks for the patch. If this patch is just about kexec, shouldn't ARCH_SELECTS_KEXEC just be changed to select ARCH_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