kconfig: powerpc: Make COMMAND_LINE_SIZE a kernel config option. Increase COMMAND_LINE_SIZE for the powerpc architecture.
Subsystems (15)
cover kconfig: powerpc: Make COMMAND_LINE_SIZE a kernel config option. Increase COMMAND_LINE_SIZE for the powerpc architecture.
I'm sending this out as a RFC to get feedback and see which way folks would like to go. Patch 1 of this patch set makes COMMAND_LINE_SIZE a seperate config option for each architecture. However, an alternative to that would be to create a single default size(Possibly 2048 to satisfy patchs 2 and 3 of this patch set) for COMMAND_LINE_SIZE in ~kernel/Kconfig or ~init/Kconfig and then allow the different architecures to either bump this size up or down if needed.
This set of changes focus on COMMAND_LINE_SIZE. An inital patch was created to increase the size of COMMAND_LINE_SIZE for the powerpc architecture. However, after looking at the code, it appears powerpc does not actually use the define in the ppc headers but uses the common generic default. It seems like having COMMAND_LINE_SIZE a kernel config options is a cleaner way to modify the value, instead of going through and chaning defines. This applies to all architectures and not just powerpc.
The powerpc architecture uses asm-generic to set the value of COMMAND_LINE_SIZE, which should be changed to a kernel config option.
The size of COMMAND_LINE_SIZE for powerpc should be longer than 512 characters, as iscsi targets and cloud-init parameters are passed through the kernel command line.
Joseph Salisbury (3):
kconfig: Change COMMAND_LINE_SIZE to a kernel config option, which is
now set per architecture.
powerpc: Change the powerpc architecture to use Kconfig to set
COMMAND_LINE_SIZE.
powerpc: kconfig: Increase the size of COMMAND_LINE_SIZE to 2048 from
512 for powerpc.
arch/alpha/Kconfig | 6 ++++++ arch/alpha/include/uapi/asm/setup.h | 4 +++- arch/arc/Kconfig | 6 ++++++ arch/arc/include/asm/setup.h | 4 +++- arch/arm/Kconfig | 6 ++++++ arch/arm/include/uapi/asm/setup.h | 4 +++- arch/arm64/Kconfig | 6 ++++++ arch/arm64/include/uapi/asm/setup.h | 4 +++- arch/avr32/Kconfig | 6 ++++++ arch/avr32/include/uapi/asm/setup.h | 4 +++- arch/c6x/Kconfig | 6 ++++++ arch/c6x/include/uapi/asm/setup.h | 4 +++- arch/cris/Kconfig | 6 ++++++ arch/cris/include/uapi/asm/setup.h | 4 +++- arch/frv/Kconfig | 6 ++++++ arch/frv/include/uapi/asm/setup.h | 5 +++-- arch/ia64/Kconfig | 6 ++++++ arch/ia64/include/uapi/asm/setup.h | 4 +++- arch/m32r/Kconfig | 6 ++++++ arch/m32r/include/uapi/asm/setup.h | 5 +++-- arch/m68k/Kconfig | 6 ++++++ arch/m68k/include/uapi/asm/setup.h | 4 +++- arch/microblaze/Kconfig | 6 ++++++ arch/microblaze/include/uapi/asm/setup.h | 4 +++- arch/mips/Kconfig | 6 ++++++ arch/mips/include/uapi/asm/setup.h | 5 +++-- arch/mn10300/Kconfig | 6 ++++++ arch/mn10300/include/uapi/asm/param.h | 4 +++- arch/parisc/Kconfig | 6 ++++++ arch/parisc/include/uapi/asm/setup.h | 4 +++- arch/powerpc/Kconfig | 6 ++++++ arch/powerpc/boot/ops.h | 5 ++++- arch/powerpc/include/asm/setup.h | 2 -- arch/powerpc/include/uapi/asm/setup.h | 1 - arch/s390/Kconfig | 6 ++++++ arch/s390/include/uapi/asm/setup.h | 4 +++- arch/score/Kconfig | 6 ++++++ arch/score/include/uapi/asm/setup.h | 5 ++++- arch/sparc/Kconfig | 7 +++++++ arch/sparc/include/uapi/asm/setup.h | 7 ++----- arch/tile/Kconfig | 6 ++++++ arch/tile/include/uapi/asm/setup.h | 5 +++-- arch/um/Kconfig.um | 6 ++++++ arch/um/include/asm/setup.h | 4 +++- arch/x86/Kconfig | 6 ++++++ arch/x86/include/asm/setup.h | 4 +++- arch/xtensa/Kconfig | 6 ++++++ arch/xtensa/include/uapi/asm/setup.h | 4 +++- include/uapi/asm-generic/setup.h | 2 +- 49 files changed, 210 insertions(+), 35 deletions(-) delete mode 100644 arch/powerpc/include/uapi/asm/setup.h
Signature · 1 line
1.9.1
RFC PATCH 1/3 kconfig: Change COMMAND_LINE_SIZE to a kernel config option, which is now set per architecture.
Having COMMAND_LINE_SIZE a kernel config option is a cleaner way to modify the value if needed. Currently defines need to be changed within the architecture specific header files.
The default COMMAND_LINE_SIZE for asm-generic is still set by a define in include/asm-generic/setup.h.
--- arch/alpha/Kconfig | 6 ++++++ arch/alpha/include/uapi/asm/setup.h | 4 +++- arch/arc/Kconfig | 6 ++++++ arch/arc/include/asm/setup.h | 4 +++- arch/arm/Kconfig | 6 ++++++ arch/arm/include/uapi/asm/setup.h | 4 +++- arch/arm64/Kconfig | 6 ++++++ arch/arm64/include/uapi/asm/setup.h | 4 +++- arch/avr32/Kconfig | 6 ++++++ arch/avr32/include/uapi/asm/setup.h | 4 +++- arch/c6x/Kconfig | 6 ++++++ arch/c6x/include/uapi/asm/setup.h | 4 +++- arch/cris/Kconfig | 6 ++++++ arch/cris/include/uapi/asm/setup.h | 4 +++- arch/frv/Kconfig | 6 ++++++ arch/frv/include/uapi/asm/setup.h | 5 +++-- arch/ia64/Kconfig | 6 ++++++ arch/ia64/include/uapi/asm/setup.h | 4 +++- arch/m32r/Kconfig | 6 ++++++ arch/m32r/include/uapi/asm/setup.h | 5 +++-- arch/m68k/Kconfig | 6 ++++++ arch/m68k/include/uapi/asm/setup.h | 4 +++- arch/microblaze/Kconfig | 6 ++++++ arch/microblaze/include/uapi/asm/setup.h | 4 +++- arch/mips/Kconfig | 6 ++++++ arch/mips/include/uapi/asm/setup.h | 5 +++-- arch/mn10300/Kconfig | 6 ++++++ arch/mn10300/include/uapi/asm/param.h | 4 +++- arch/parisc/Kconfig | 6 ++++++ arch/parisc/include/uapi/asm/setup.h | 4 +++- arch/powerpc/Kconfig | 6 ++++++ arch/powerpc/boot/ops.h | 5 ++++- arch/s390/Kconfig | 6 ++++++ arch/s390/include/uapi/asm/setup.h | 4 +++- arch/score/Kconfig | 6 ++++++ arch/score/include/uapi/asm/setup.h | 5 ++++- arch/sparc/Kconfig | 7 +++++++ arch/sparc/include/uapi/asm/setup.h | 7 ++----- arch/tile/Kconfig | 6 ++++++ arch/tile/include/uapi/asm/setup.h | 5 +++-- arch/um/Kconfig.um | 6 ++++++ arch/um/include/asm/setup.h | 4 +++- arch/x86/Kconfig | 6 ++++++ arch/x86/include/asm/setup.h | 4 +++- arch/xtensa/Kconfig | 6 ++++++ arch/xtensa/include/uapi/asm/setup.h | 4 +++- include/uapi/asm-generic/setup.h | 2 +- 47 files changed, 210 insertions(+), 32 deletions(-)
arch/alpha/Kconfig +6 -0
@@ -563,6 +563,12 @@ config HAVE_DEC_LOCK depends on SMP default y +config COMMAND_LINE_SIZE + int "Maximum size of the command line" + default "256" + help + This is the per architecture maximum command line size. + config NR_CPUS int "Maximum number of CPUs (2-32)" range 2 32
arch/alpha/include/uapi/asm/setup.h +3 -1
@@ -1,7 +1,9 @@#ifndef __ALPHA_SETUP_H#define __ALPHA_SETUP_H -#define COMMAND_LINE_SIZE 256 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif /* * We leave one page for the initial stack page, and one page for
arch/arc/Kconfig +6 -0
@@ -141,6 +141,12 @@ config ARC_HAS_REENTRANT_IRQ_LV2 endif +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "256" + help + This is the per architecture maximum command line size. + config NR_CPUS int "Maximum number of CPUs (2-4096)" range 2 4096
arch/arc/include/asm/setup.h +3 -1
@@ -12,7 +12,9 @@#include <linux/types.h> #include <uapi/asm/setup.h> -#define COMMAND_LINE_SIZE 256 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif /* * Data structure to map a ID to string
arch/arm/Kconfig +6 -0
@@ -1615,6 +1615,12 @@ config PAGE_OFFSET default 0x80000000 if VMSPLIT_2G default 0xC0000000 +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "1024" + help + This is the per architecture maximum command line size. + config NR_CPUS int "Maximum number of CPUs (2-32)" range 2 32
arch/arm/include/uapi/asm/setup.h +3 -1
@@ -16,7 +16,9 @@#include <linux/types.h> -#define COMMAND_LINE_SIZE 1024 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif /* The list ends with an ATAG_NONE node. */ #define ATAG_NONE 0x00000000
arch/arm64/Kconfig +6 -0
@@ -186,6 +186,12 @@ config SCHED_SMT MultiThreading at a cost of slightly increased overhead in some places. If unsure say N here. +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "2048" + help + This is the per architecture maximum command line size. + config NR_CPUS int "Maximum number of CPUs (2-32)" range 2 32
arch/arm64/include/uapi/asm/setup.h +3 -1
@@ -21,6 +21,8 @@#include <linux/types.h> -#define COMMAND_LINE_SIZE 2048 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif
arch/avr32/Kconfig +6 -0
@@ -233,6 +233,12 @@ config NMI_DEBUGGING source "kernel/Kconfig.hz" +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "256" + help + This is the per architecture maximum command line size. + config CMDLINE string "Default kernel command line" default ""
arch/avr32/include/uapi/asm/setup.h +3 -1
@@ -11,6 +11,8 @@#ifndef _UAPI__ASM_AVR32_SETUP_H__#define _UAPI__ASM_AVR32_SETUP_H__ -#define COMMAND_LINE_SIZE 256 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif /* _UAPI__ASM_AVR32_SETUP_H__ */
arch/c6x/Kconfig +6 -0
@@ -57,6 +57,12 @@ source "kernel/Kconfig.freezer" config CMDLINE_BOOL bool "Default bootloader kernel arguments" +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "1024" + help + This is the per architecture maximum command line size. + config CMDLINE string "Kernel command line" depends on CMDLINE_BOOL
arch/c6x/include/uapi/asm/setup.h +3 -1
@@ -1,6 +1,8 @@#ifndef _UAPI_ASM_C6X_SETUP_H#define _UAPI_ASM_C6X_SETUP_H -#define COMMAND_LINE_SIZE 1024 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif /* _UAPI_ASM_C6X_SETUP_H */
arch/cris/Kconfig +6 -0
@@ -65,6 +65,12 @@ menu "General setup" source "fs/Kconfig.binfmt" +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "256" + help + This is the per architecture maximum command line size. + config ETRAX_CMDLINE string "Kernel command line" default "root=/dev/mtdblock3"
arch/cris/include/uapi/asm/setup.h +3 -1
@@ -1,6 +1,8 @@#ifndef _CRIS_SETUP_H#define _CRIS_SETUP_H -#define COMMAND_LINE_SIZE 256 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif
arch/frv/Kconfig +6 -0
@@ -54,6 +54,12 @@ config HZ int default 1000 +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "512" + help + This is the per architecture maximum command line size. + source "init/Kconfig" source "kernel/Kconfig.freezer"
arch/frv/include/uapi/asm/setup.h +3 -2
@@ -12,7 +12,8 @@#ifndef _UAPI_ASM_SETUP_H#define _UAPI_ASM_SETUP_H -#define COMMAND_LINE_SIZE 512 - +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif /* _UAPI_ASM_SETUP_H */
arch/ia64/Kconfig +6 -0
@@ -352,6 +352,12 @@ config SMP If you don't know what to do here, say N. +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "2048" + help + This is the per architecture maximum command line size. + config NR_CPUS int "Maximum number of CPUs (2-4096)" range 2 4096
arch/ia64/include/uapi/asm/setup.h +3 -1
@@ -1,7 +1,9 @@ #ifndef __IA64_SETUP_H #define __IA64_SETUP_H -#define COMMAND_LINE_SIZE 2048 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif extern struct ia64_boot_param { __u64 command_line; /* physical address of command line arguments */
arch/m32r/Kconfig +6 -0
@@ -300,6 +300,12 @@ config CHIP_M32700_TS1 depends on (CHIP_M32700 && SMP) default n +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "512" + help + This is the per architecture maximum command line size. + config NR_CPUS int "Maximum number of CPUs (2-32)" range 2 32
arch/m32r/include/uapi/asm/setup.h +3 -2
@@ -5,7 +5,8 @@* This is set up by the setup-routine at boot-time */ -#define COMMAND_LINE_SIZE 512 - +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif /* _UAPI_ASM_M32R_SETUP_H */
arch/m68k/Kconfig +6 -0
@@ -124,6 +124,12 @@ endmenu menu "Kernel Features" +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "256" + help + This is the per architecture maximum command line size. + if COLDFIRE source "kernel/Kconfig.preempt" endif
arch/m68k/include/uapi/asm/setup.h +3 -1
@@ -11,6 +11,8 @@#ifndef _UAPI_M68K_SETUP_H#define _UAPI_M68K_SETUP_H -#define COMMAND_LINE_SIZE 256 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif /* _UAPI_M68K_SETUP_H */
arch/microblaze/Kconfig +6 -0
@@ -91,6 +91,12 @@ comment "Boot options" config CMDLINE_BOOL bool "Default bootloader kernel arguments" +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "256" + help + This is the per architecture maximum command line size. + config CMDLINE string "Default kernel command string" depends on CMDLINE_BOOL
arch/microblaze/include/uapi/asm/setup.h +3 -1
@@ -11,7 +11,9 @@#ifndef _UAPI_ASM_MICROBLAZE_SETUP_H#define _UAPI_ASM_MICROBLAZE_SETUP_H -#define COMMAND_LINE_SIZE 256 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif # ifndef __ASSEMBLY__
arch/mips/Kconfig +6 -0
@@ -2247,6 +2247,12 @@ config HW_PERF_EVENTS source "mm/Kconfig" +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "4096" + help + This is the per architecture maximum command line size. + config SMP bool "Multi-Processing support" depends on SYS_SUPPORTS_SMP
arch/mips/include/uapi/asm/setup.h +3 -2
@@ -1,7 +1,8 @@#ifndef _UAPI_MIPS_SETUP_H#define _UAPI_MIPS_SETUP_H -#define COMMAND_LINE_SIZE 4096 - +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif /* _UAPI_MIPS_SETUP_H */
arch/mn10300/Kconfig +6 -0
@@ -199,6 +199,12 @@ config SMP If you don't know what to do here, say N. +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "256" + help + This is the per architecture maximum command line size. + config NR_CPUS int depends on SMP
arch/mn10300/include/uapi/asm/param.h +3 -1
@@ -13,6 +13,8 @@#include <asm-generic/param.h> -#define COMMAND_LINE_SIZE 256 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif /* _ASM_PARAM_H */
arch/parisc/Kconfig +6 -0
@@ -295,6 +295,12 @@ config HPUX bool "Support for HP-UX binaries" depends on !64BIT +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "1024" + help + This is the per architecture maximum command line size. + config NR_CPUS int "Maximum number of CPUs (2-32)" range 2 32
arch/parisc/include/uapi/asm/setup.h +3 -1
@@ -1,6 +1,8 @@#ifndef _PARISC_SETUP_H#define _PARISC_SETUP_H -#define COMMAND_LINE_SIZE 1024 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif /* _PARISC_SETUP_H */
arch/powerpc/Kconfig +6 -0
@@ -612,6 +612,12 @@ config PPC_DENORMALISATION config CMDLINE_BOOL bool "Default bootloader kernel arguments" +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "512" + help + This is the per architecture maximum command line size. + config CMDLINE string "Initial kernel command string" depends on CMDLINE_BOOL
arch/powerpc/boot/ops.h +4 -1
@@ -15,7 +15,10 @@#include "types.h" #include "string.h" -#define COMMAND_LINE_SIZE 512 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif +#define MAX_PATH_LEN 256#define MAX_PROP_LEN 256/* What should this be? */
arch/s390/Kconfig +6 -0
@@ -348,6 +348,12 @@ config SMP Even if you don't know what to do here, say Y. +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "4096" + help + This is the per architecture maximum command line size. + config NR_CPUS int "Maximum number of CPUs (2-256)" range 2 256
arch/s390/include/uapi/asm/setup.h +3 -1
@@ -6,7 +6,9 @@#ifndef _UAPI_ASM_S390_SETUP_H#define _UAPI_ASM_S390_SETUP_H -#define COMMAND_LINE_SIZE 4096 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #define ARCH_COMMAND_LINE_SIZE 896
arch/score/Kconfig +6 -0
@@ -58,6 +58,12 @@ config 32BIT config ARCH_FLATMEM_ENABLE def_bool y +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "256" + help + This is the per architecture maximum command line size. + source "mm/Kconfig" config MEMORY_START
arch/score/include/uapi/asm/setup.h +4 -1
@@ -1,7 +1,10 @@#ifndef _UAPI_ASM_SCORE_SETUP_H#define _UAPI_ASM_SCORE_SETUP_H -#define COMMAND_LINE_SIZE 256 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif +#define MEMORY_START 0#define MEMORY_SIZE 0x2000000
arch/sparc/Kconfig +7 -0
@@ -329,6 +329,13 @@ config CMDLINE_BOOL bool "Default bootloader kernel arguments" depends on SPARC64 +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "256" if SPARC32 + default "2048" if SPARC64 + help + This is the per architecture maximum command line size. + config CMDLINE string "Initial kernel command string" depends on CMDLINE_BOOL
arch/sparc/include/uapi/asm/setup.h +2 -5
@@ -5,11 +5,8 @@#ifndef _UAPI_SPARC_SETUP_H#define _UAPI_SPARC_SETUP_H -#if defined(__sparc__) && defined(__arch64__) -# define COMMAND_LINE_SIZE 2048 -#else -# define COMMAND_LINE_SIZE 256 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE#endif -#endif /* _UAPI_SPARC_SETUP_H */
arch/tile/Kconfig +6 -0
@@ -336,6 +336,12 @@ config CMDLINE_BOOL Systems with fully functional boot loaders (e.g. mboot, or if booting over PCI) should leave this option set to 'N'. +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "2048" + help + This is the per architecture maximum command line size. + config CMDLINE string "Built-in kernel command string" depends on CMDLINE_BOOL
arch/tile/include/uapi/asm/setup.h +3 -2
@@ -15,7 +15,8 @@#ifndef _UAPI_ASM_TILE_SETUP_H#define _UAPI_ASM_TILE_SETUP_H -#define COMMAND_LINE_SIZE 2048 - +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif /* _UAPI_ASM_TILE_SETUP_H */
arch/um/Kconfig.um +6 -0
@@ -119,6 +119,12 @@ config SMP If you don't know what to do, say N. +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "4096" + help + This is the per architecture maximum command line size. + config NR_CPUS int "Maximum number of CPUs (2-32)" range 2 32
arch/um/include/asm/setup.h +3 -1
@@ -5,6 +5,8 @@* command line, so this choice is ok. */ -#define COMMAND_LINE_SIZE 4096 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #endif /* SETUP_H_INCLUDED */
arch/x86/Kconfig +6 -0
@@ -1826,6 +1826,12 @@ config CMDLINE_BOOL Systems with fully functional boot loaders (i.e. non-embedded) should leave this option set to 'N'. +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "2048" + help + This is the per architecture maximum command line size. + config CMDLINE string "Built-in kernel command string" depends on CMDLINE_BOOL
arch/x86/include/asm/setup.h +3 -1
@@ -3,7 +3,9 @@#include <uapi/asm/setup.h> -#define COMMAND_LINE_SIZE 2048 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif #include <linux/linkage.h>
arch/xtensa/Kconfig +6 -0
@@ -266,6 +266,12 @@ config GENERIC_CALIBRATE_DELAY config CMDLINE_BOOL bool "Default bootloader kernel arguments" +config COMMAND_LINE_SIZE + int "Maximum size of the command line." + default "256" + help + This is the per architecture maximum command line size. + config CMDLINE string "Initial kernel command string" depends on CMDLINE_BOOL
arch/xtensa/include/uapi/asm/setup.h +3 -1
@@ -11,7 +11,9 @@#ifndef _XTENSA_SETUP_H#define _XTENSA_SETUP_H -#define COMMAND_LINE_SIZE 256 +#ifdef CONFIG_COMMAND_LINE_SIZE +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE +#endif extern void set_except_vector (int n,void *addr);
include/uapi/asm-generic/setup.h +1 -1
@@ -1,6 +1,6 @@#ifndef __ASM_GENERIC_SETUP_H#define __ASM_GENERIC_SETUP_H -#define COMMAND_LINE_SIZE 512 +#define COMMAND_LINE_SIZE 512#endif /* __ASM_GENERIC_SETUP_H */
Signature · 1 line
1.9.1
RFC PATCH 2/3 powerpc: Change the powerpc architecture to use Kconfig to set COMMAND_LINE_SIZE.
In reply to Joseph SalisburyThe powerpc architecture currently uses asm-generic to set the value of COMMAND_LINE_SIZE. This change will allow the value of COMMAND_LINE_SIZE to be set specifically for powerpc without affecting other architectures that may use asm-generic.
--- arch/powerpc/include/asm/setup.h | 2 -- arch/powerpc/include/uapi/asm/setup.h | 1 - 2 files changed, 3 deletions(-) delete mode 100644 arch/powerpc/include/uapi/asm/setup.h
arch/powerpc/include/asm/setup.h +0 -2
@@ -1,8 +1,6 @@#ifndef _ASM_POWERPC_SETUP_H#define _ASM_POWERPC_SETUP_H -#include <uapi/asm/setup.h> -#ifndef __ASSEMBLY__extern void ppc_printk_progress (char *s,unsigned short hex);
arch/powerpc/include/uapi/asm/setup.h deleted +0 -1
@@ -1 +0,0 @@ -#include <asm-generic/setup.h>
Signature · 1 line
1.9.1
RFC PATCH 3/3 powerpc: kconfig: Increase the size of COMMAND_LINE_SIZE to 2048 from 512 for powerpc.
In reply to Joseph SalisburyWhile booting the PPC64EL kernel, the command line gets truncated to 512 characters. This is due to a limit of 512 defined for COMMAND_LINE_SIZE. It would be beneficial to have a command line longer than 512 characters, as iscsi targets and cloud-init parameters are passed through the kernel command line.
--- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/Kconfig +1 -1
@@ -614,7 +614,7 @@ config CMDLINE_BOOL config COMMAND_LINE_SIZE int "Maximum size of the command line." - default "512" + default "2048" help This is the per architecture maximum command line size.
Signature · 1 line
1.9.1