[PATCH] riscv: unconditionally select ARCH_KEEP_MEMBLOCK

Paul Walmsley pjw at kernel.org
Wed May 27 18:01:19 PDT 2026


On Mon, 25 May 2026, Han Gao wrote:

> On Fri, May 22, 2026 at 6:04 AM Paul Walmsley <pjw at kernel.org> wrote:
> >
> > On Wed, 20 May 2026, Han Gao wrote:
> >
> > > 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.
> > >
> > > Signed-off-by: Han Gao <gaohan at iscas.ac.cn>
> >
> > 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


More information about the linux-riscv mailing list