CC: Paul Mackerras <paulus@samba.org>
- 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-03-28 15:13:29.255586696 -0800
+++ 25-akpm/arch/ppc64/kernel/chrp_setup.c	2004-03-28 15:13:29.270584416 -0800
@@ -58,6 +58,7 @@
 #include <asm/naca.h>
 #include <asm/time.h>
 #include <asm/nvram.h>
+#include <asm/setup.h>
 
 #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-03-28 15:13:29.256586544 -0800
+++ 25-akpm/arch/ppc64/kernel/eeh.c	2004-03-28 15:13:48.168711464 -0800
@@ -30,6 +30,7 @@
 #include <asm/naca.h>
 #include <asm/io.h>
 #include <asm/machdep.h>
+#include <asm/setup.h>
 #include <asm/pgtable.h>
 #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-03-28 15:13:29.258586240 -0800
+++ 25-akpm/arch/ppc64/kernel/head.S	2004-03-28 15:13:29.272584112 -0800
@@ -35,6 +35,7 @@
 #include <asm/offsets.h>
 #include <asm/bug.h>
 #include <asm/cputable.h>
+#include <asm/setup.h>
 
 #ifdef CONFIG_PPC_ISERIES
 #define DO_SOFT_DISABLE
@@ -2275,4 +2276,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-03-28 15:13:29.259586088 -0800
+++ 25-akpm/arch/ppc64/kernel/iSeries_setup.c	2004-03-28 15:13:29.273583960 -0800
@@ -36,6 +36,7 @@
 #include <asm/pgtable.h>
 #include <asm/mmu_context.h>
 #include <asm/cputable.h>
+#include <asm/setup.h>
 
 #include <asm/time.h>
 #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-03-28 15:13:29.261585784 -0800
+++ 25-akpm/arch/ppc64/kernel/pmac_setup.c	2004-03-28 15:13:29.274583808 -0800
@@ -70,6 +70,7 @@
 #include <asm/time.h>
 #include <asm/of_device.h>
 #include <asm/lmb.h>
+#include <asm/setup.h>
 
 #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-03-28 15:13:29.262585632 -0800
+++ 25-akpm/arch/ppc64/kernel/prom.c	2004-03-28 15:13:29.276583504 -0800
@@ -52,7 +52,7 @@
 #include <asm/ppcdebug.h>
 #include <asm/btext.h>
 #include <asm/sections.h>
-#include <asm/machdep.h>
+#include <asm/setup.h>
 #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-03-28 15:13:29.264585328 -0800
+++ 25-akpm/arch/ppc64/kernel/setup.c	2004-03-28 15:13:29.277583352 -0800
@@ -43,6 +43,7 @@
 #include <asm/btext.h>
 #include <asm/nvram.h>
 #include <asm/system.h>
+#include <asm/setup.h>
 
 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-03-28 15:13:29.265585176 -0800
+++ 25-akpm/arch/ppc64/kernel/vmlinux.lds.S	2004-03-28 15:13:29.277583352 -0800
@@ -59,6 +59,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-03-28 15:13:29.266585024 -0800
+++ 25-akpm/arch/ppc64/mm/numa.c	2004-03-28 15:13:29.278583200 -0800
@@ -15,7 +15,7 @@
 #include <linux/mmzone.h>
 #include <linux/module.h>
 #include <asm/lmb.h>
-#include <asm/machdep.h>
+#include <asm/setup.h>
 
 #if 1
 #define dbg(args...) udbg_printf(args)
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-03-28 15:13:29.267584872 -0800
+++ 25-akpm/include/asm-ppc64/machdep.h	2004-03-28 15:13:29.278583200 -0800
@@ -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-03-28 15:13:29.268584720 -0800
+++ 25-akpm/include/asm-ppc64/setup.h	2004-03-28 15:13:29.278583200 -0800
@@ -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 */

_