From: Tom Rini - Remove saved_command_line (and saving of the command line). - Call parse_early_options --- 25-akpm/arch/ppc64/kernel/chrp_setup.c | 1 + 25-akpm/arch/ppc64/kernel/eeh.c | 1 + 25-akpm/arch/ppc64/kernel/head.S | 3 ++- 25-akpm/arch/ppc64/kernel/iSeries_setup.c | 1 + 25-akpm/arch/ppc64/kernel/pmac_setup.c | 1 + 25-akpm/arch/ppc64/kernel/prom.c | 2 +- 25-akpm/arch/ppc64/kernel/setup.c | 5 ++--- 25-akpm/arch/ppc64/kernel/vmlinux.lds.S | 5 +++++ 25-akpm/arch/ppc64/mm/numa.c | 2 +- 25-akpm/include/asm-ppc64/machdep.h | 3 --- 25-akpm/include/asm-ppc64/setup.h | 7 ++++++- 11 files changed, 21 insertions(+), 10 deletions(-) diff -puN arch/ppc64/kernel/chrp_setup.c~early-param-ppc64 arch/ppc64/kernel/chrp_setup.c --- 25/arch/ppc64/kernel/chrp_setup.c~early-param-ppc64 2004-04-04 17:01:16.761084176 -0700 +++ 25-akpm/arch/ppc64/kernel/chrp_setup.c 2004-04-04 17:01:16.792079464 -0700 @@ -58,6 +58,7 @@ #include #include #include +#include #include "i8259.h" #include "open_pic.h" diff -puN arch/ppc64/kernel/eeh.c~early-param-ppc64 arch/ppc64/kernel/eeh.c --- 25/arch/ppc64/kernel/eeh.c~early-param-ppc64 2004-04-04 17:01:16.763083872 -0700 +++ 25-akpm/arch/ppc64/kernel/eeh.c 2004-04-04 17:01:16.793079312 -0700 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "pci.h" diff -puN arch/ppc64/kernel/head.S~early-param-ppc64 arch/ppc64/kernel/head.S --- 25/arch/ppc64/kernel/head.S~early-param-ppc64 2004-04-04 17:01:16.765083568 -0700 +++ 25-akpm/arch/ppc64/kernel/head.S 2004-04-04 17:01:16.794079160 -0700 @@ -35,6 +35,7 @@ #include #include #include +#include #ifdef CONFIG_PPC_ISERIES #define DO_SOFT_DISABLE @@ -2280,4 +2281,4 @@ stab_array: */ .globl cmd_line cmd_line: - .space 512 /* COMMAND_LINE_SIZE */ + .space COMMAND_LINE_SIZE diff -puN arch/ppc64/kernel/iSeries_setup.c~early-param-ppc64 arch/ppc64/kernel/iSeries_setup.c --- 25/arch/ppc64/kernel/iSeries_setup.c~early-param-ppc64 2004-04-04 17:01:16.767083264 -0700 +++ 25-akpm/arch/ppc64/kernel/iSeries_setup.c 2004-04-04 17:01:16.796078856 -0700 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include "iSeries_setup.h" diff -puN arch/ppc64/kernel/pmac_setup.c~early-param-ppc64 arch/ppc64/kernel/pmac_setup.c --- 25/arch/ppc64/kernel/pmac_setup.c~early-param-ppc64 2004-04-04 17:01:16.768083112 -0700 +++ 25-akpm/arch/ppc64/kernel/pmac_setup.c 2004-04-04 17:01:16.796078856 -0700 @@ -70,6 +70,7 @@ #include #include #include +#include #include "pmac.h" diff -puN arch/ppc64/kernel/prom.c~early-param-ppc64 arch/ppc64/kernel/prom.c --- 25/arch/ppc64/kernel/prom.c~early-param-ppc64 2004-04-04 17:01:16.770082808 -0700 +++ 25-akpm/arch/ppc64/kernel/prom.c 2004-04-04 17:01:16.798078552 -0700 @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include "open_pic.h" #ifdef CONFIG_LOGO_LINUX_CLUT224 diff -puN arch/ppc64/kernel/setup.c~early-param-ppc64 arch/ppc64/kernel/setup.c --- 25/arch/ppc64/kernel/setup.c~early-param-ppc64 2004-04-04 17:01:16.771082656 -0700 +++ 25-akpm/arch/ppc64/kernel/setup.c 2004-04-04 17:01:16.800078248 -0700 @@ -43,6 +43,7 @@ #include #include #include +#include extern unsigned long klimit; /* extern void *stab; */ @@ -80,7 +81,6 @@ unsigned long decr_overclock_proc0_set = int powersave_nap; -char saved_command_line[COMMAND_LINE_SIZE]; unsigned char aux_device_present; void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5, @@ -603,9 +603,8 @@ void __init setup_arch(char **cmdline_p) init_mm.end_data = (unsigned long) _edata; init_mm.brk = klimit; - /* Save unparsed command line copy for /proc/cmdline */ - strlcpy(saved_command_line, cmd_line, sizeof(saved_command_line)); *cmdline_p = cmd_line; + parse_early_options(cmdline_p); /* set up the bootmem stuff with available memory */ do_init_bootmem(); diff -puN arch/ppc64/kernel/vmlinux.lds.S~early-param-ppc64 arch/ppc64/kernel/vmlinux.lds.S --- 25/arch/ppc64/kernel/vmlinux.lds.S~early-param-ppc64 2004-04-04 17:01:16.773082352 -0700 +++ 25-akpm/arch/ppc64/kernel/vmlinux.lds.S 2004-04-04 17:01:16.800078248 -0700 @@ -60,6 +60,11 @@ SECTIONS *(.init.setup) __setup_end = .; } + __early_param : { + __early_begin = .; + *(__early_param) + __early_end = .; + } __param : { __start___param = .; diff -puN arch/ppc64/mm/numa.c~early-param-ppc64 arch/ppc64/mm/numa.c --- 25/arch/ppc64/mm/numa.c~early-param-ppc64 2004-04-04 17:01:16.786080376 -0700 +++ 25-akpm/arch/ppc64/mm/numa.c 2004-04-04 17:01:34.965316712 -0700 @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #if 1 diff -puN include/asm-ppc64/machdep.h~early-param-ppc64 include/asm-ppc64/machdep.h --- 25/include/asm-ppc64/machdep.h~early-param-ppc64 2004-04-04 17:01:16.787080224 -0700 +++ 25-akpm/include/asm-ppc64/machdep.h 2004-04-04 17:01:16.801078096 -0700 @@ -110,9 +110,6 @@ struct machdep_calls { }; extern struct machdep_calls ppc_md; -#define COMMAND_LINE_SIZE 512 -extern char cmd_line[COMMAND_LINE_SIZE]; -extern char saved_command_line[COMMAND_LINE_SIZE]; /* Functions to produce codes on the leds. * The SRC code should be unique for the message category and should diff -puN include/asm-ppc64/setup.h~early-param-ppc64 include/asm-ppc64/setup.h --- 25/include/asm-ppc64/setup.h~early-param-ppc64 2004-04-04 17:01:16.789079920 -0700 +++ 25-akpm/include/asm-ppc64/setup.h 2004-04-04 17:01:16.802077944 -0700 @@ -1,6 +1,11 @@ #ifndef _PPC_SETUP_H #define _PPC_SETUP_H -/* This is a place holder include */ +#define COMMAND_LINE_SIZE 512 + +#ifndef __ASSEMBLY__ +extern char cmd_line[COMMAND_LINE_SIZE]; +extern char saved_command_line[COMMAND_LINE_SIZE]; +#endif #endif /* _PPC_SETUP_H */ _