Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] LoongArch: Change COMMAND_LINE_SIZE to 4096
@ 2025-09-22  2:10 Chenghao Duan
  2025-09-22  2:50 ` Chenghao Duan
  2025-09-22  2:58 ` Chenghao Duan
  0 siblings, 2 replies; 4+ messages in thread
From: Chenghao Duan @ 2025-09-22  2:10 UTC (permalink / raw)
  To: horms; +Cc: kexec, tangyouling, chenhuacai, duanchenghao

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.

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 <tangyouling@kylinos.cn>
Signed-off-by: Chenghao Duan <duanchenghao@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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-23 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22  2:10 [PATCH] LoongArch: Change COMMAND_LINE_SIZE to 4096 Chenghao Duan
2025-09-22  2:50 ` Chenghao Duan
2025-09-22  2:58 ` Chenghao Duan
2025-09-23 14:15   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox