On Mon, Sep 22, 2025 at 10:10:57AM +0800, Chenghao Duan wrote: > The default COMMAND_LINE_SIZE inherited from asm-generic is 512, which > is too small for modern use cases. For example, when the parameter path > in the cmdline of the kdump first kernel is too long, the limit is > easily exceeded when loading the second kernel. > > Increase the command line size to 4096 bytes, In LoongArch, this is > consistent with the upstream configuration of the Linux kernel. > linux kernel commit: f7794a4d92ade518c813de69a01b27ca6d8d86f3.
I'm very sorry, but the commit ID in the previous email was incorrect. linux kernel commit: f7794a4d92ad(LoongArch: Increase COMMAND_LINE_SIZE up to 4096). > > This patch is necessary because the Linux kernel has been changed to > 4096. When the kernel cmdline size exceeds 512, the --reuse-cmdline > option of the kexec command will inevitably result in an error. > > The COMMAND_LINE_SIZE in kexec/arch/loongarch/crashdump-loongarch.h > is unused, so it is removed here. > > Suggested-by: Youling Tang <tangyoul...@kylinos.cn> > Signed-off-by: Chenghao Duan <duancheng...@kylinos.cn> > --- > kexec/arch/loongarch/crashdump-loongarch.h | 2 -- > kexec/arch/loongarch/kexec-loongarch.h | 2 +- > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/kexec/arch/loongarch/crashdump-loongarch.h > b/kexec/arch/loongarch/crashdump-loongarch.h > index 25ff24b..dac9e71 100644 > --- a/kexec/arch/loongarch/crashdump-loongarch.h > +++ b/kexec/arch/loongarch/crashdump-loongarch.h > @@ -20,7 +20,5 @@ int get_crash_kernel_load_range(uint64_t *start, uint64_t > *end); > /* crash dump kernel support at most two regions, low_region and high > region. */ > #define CRASH_MAX_RESERVED_RANGES 2 > > -#define COMMAND_LINE_SIZE 512 > - > extern struct arch_options_t arch_options; > #endif /* CRASHDUMP_LOONGARCH_H */ > diff --git a/kexec/arch/loongarch/kexec-loongarch.h > b/kexec/arch/loongarch/kexec-loongarch.h > index 2c7624f..0bd462f 100644 > --- a/kexec/arch/loongarch/kexec-loongarch.h > +++ b/kexec/arch/loongarch/kexec-loongarch.h > @@ -13,7 +13,7 @@ > > #define CORE_TYPE_ELF64 1 > > -#define COMMAND_LINE_SIZE 512 > +#define COMMAND_LINE_SIZE 4096 > > #define KiB(x) ((x) * 1024UL) > #define MiB(x) (KiB(x) * 1024UL) > -- > 2.25.1