[PATCH 1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures
Wilson Felipe Pereira <[email protected]> Thu, 6 Aug 2026 06:14:14 +0000
| Newsgroups | org.infradead.lists.linux-riscv,org.kernel.vger.linux-arch,org.kernel.vger.linux-s390 |
|---|---|
| Message-ID | <[email protected]> |
Currently, only s390 has the ability to configure the maximum kernel command line size via Kconfig (CONFIG_COMMAND_LINE_SIZE). Other architectures define a hardcoded COMMAND_LINE_SIZE macro in their setup.sh headers. In some use cases, such as netboot kernels, rootfs configurations, larger initramfs setups, require larger sizes. While for embedded workloads, it can be reduced to save memory. Move config COMMAND_LINE_SIZE out of arch/s390/Kconfig and into init/Kconfig under General setup so that all architectures can configure their maximum command line length. The default values were added to keep the values unchanged. Originally-by: Maciej Żenczykowski <[email protected]> Signed-off-by: Wilson Felipe Pereira <[email protected]> --- arch/s390/Kconfig | 8 -------- init/Kconfig | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 84404e6778d50..f5536e042ce29 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -511,14 +511,6 @@ endchoice config 64BIT def_bool y -config COMMAND_LINE_SIZE - int "Maximum size of kernel command line" - default 4096 - range 896 1048576 - help - This allows you to specify the maximum length of the kernel command - line. - config SMP def_bool y diff --git a/init/Kconfig b/init/Kconfig index 10f2013b53216..d42bb55cb2152 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1569,6 +1569,18 @@ config BOOT_CONFIG_EMBED_FILE This bootconfig will be used if there is no initrd or no other bootconfig in the initrd. +config COMMAND_LINE_SIZE + int "Maximum size of kernel command line" + default 4096 if S390 || LOONGARCH || MIPS || UM + default 2048 if X86 || ARM64 || POWERPC || SPARC64 + default 1024 if ARM || PARISC || RISCV + default 256 if ALPHA || ARC || M68K || MICROBLAZE || SPARC32 || XTENSA + default 512 + range 256 1048576 + help + This allows you to specify the maximum length of the kernel command + line. + config CMDLINE_LOG_WRAP_IDEAL_LEN int "Length to try to wrap the cmdline when logged at boot" default 1021 -- 2.55.0.654.g21b8a5bc05-goog _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv