From: Tom Rini - Remove saved_command_line (and saving of the command line). - Call parse_early_options --- 25-akpm/arch/sh/kernel/setup.c | 8 ++------ 25-akpm/arch/sh/kernel/vmlinux.lds.S | 3 +++ 25-akpm/include/asm-sh/setup.h | 8 ++++++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff -puN arch/sh/kernel/setup.c~early-param-sh arch/sh/kernel/setup.c --- 25/arch/sh/kernel/setup.c~early-param-sh 2004-04-01 02:06:17.276752936 -0800 +++ 25-akpm/arch/sh/kernel/setup.c 2004-04-01 02:06:17.280752328 -0800 @@ -25,6 +25,7 @@ #include #include #include +#include #ifdef CONFIG_SH_EARLY_PRINTK #include #endif @@ -85,14 +86,12 @@ static struct sh_machine_vector* __init #define INITRD_SIZE (*(unsigned long *) (PARAM+0x014)) /* ... */ #define COMMAND_LINE ((char *) (PARAM+0x100)) -#define COMMAND_LINE_SIZE 256 #define RAMDISK_IMAGE_START_MASK 0x07FF #define RAMDISK_PROMPT_FLAG 0x8000 #define RAMDISK_LOAD_FLAG 0x4000 static char command_line[COMMAND_LINE_SIZE] = { 0, }; - char saved_command_line[COMMAND_LINE_SIZE]; struct resource standard_io_resources[] = { { "dma1", 0x00, 0x1f }, @@ -252,10 +251,6 @@ static inline void parse_cmdline (char * char c = ' ', *to = command_line, *from = COMMAND_LINE; int len = 0; - /* Save unparsed command line copy for /proc/cmdline */ - memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); - saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; - memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; memory_end = memory_start + __MEMORY_SIZE; @@ -411,6 +406,7 @@ void __init setup_arch(char **cmdline_p) data_resource.end = virt_to_bus(_edata)-1; sh_mv_setup(cmdline_p); + parse_early_options(cmdline_p); #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) diff -puN arch/sh/kernel/vmlinux.lds.S~early-param-sh arch/sh/kernel/vmlinux.lds.S --- 25/arch/sh/kernel/vmlinux.lds.S~early-param-sh 2004-04-01 02:06:17.277752784 -0800 +++ 25-akpm/arch/sh/kernel/vmlinux.lds.S 2004-04-01 02:06:17.281752176 -0800 @@ -67,6 +67,9 @@ SECTIONS __setup_start = .; .init.setup : { *(.init.setup) } __setup_end = .; + __early_begin = .; + __early_param : { *(__early_param) } + __early_end = .; __start___param = .; __param : { *(__param) } __stop___param = .; diff -puN /dev/null include/asm-sh/setup.h --- /dev/null 2003-09-15 06:40:47.000000000 -0700 +++ 25-akpm/include/asm-sh/setup.h 2004-04-01 02:06:17.281752176 -0800 @@ -0,0 +1,8 @@ +#ifdef __KERNEL__ +#ifndef _SH_SETUP_H +#define _SH_SETUP_H + +#define COMMAND_LINE_SIZE 256 + +#endif /* _SH_SETUP_H */ +#endif /* __KERNEL__ */ _