@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 ""
@@ -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__ */
@@ -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
@@ -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 */
@@ -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"
@@ -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
@@ -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"
@@ -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 */
@@ -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
@@ -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 */
@@ -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
@@ -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 */
@@ -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
@@ -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 */
@@ -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
@@ -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__
@@ -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
@@ -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 */
@@ -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
@@ -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 */
@@ -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
@@ -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 */
@@ -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
@@ -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? */
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 */
@@ -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
@@ -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 */
@@ -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
@@ -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 */
@@ -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
@@ -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>
@@ -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
@@ -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);
@@ -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 */
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. Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com> --- 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(-)