From: Andi Kleen <ak@muc.de>

x86-64 wants to parse pci= and acpi= early, but not steal unrecognized
acpi/pci options from the later __setup handler.  Allow to reject unknown
options by returning -1


---

 25-akpm/init/main.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -puN init/main.c~early-param-core-retval-fix init/main.c
--- 25/init/main.c~early-param-core-retval-fix	2004-03-30 19:49:04.839202912 -0800
+++ 25-akpm/init/main.c	2004-03-30 19:49:04.841202608 -0800
@@ -419,6 +419,7 @@ void __init parse_early_options(char **c
 	for (;;) {
 		if (c == ' ') {
 			struct early_params *p;
+			char *before = from;
 
 			for (p = &__early_begin; p < &__early_end; p++) {
 				int len = strlen(p->arg);
@@ -427,8 +428,10 @@ void __init parse_early_options(char **c
 					if (to != *cmdline_p)
 						to -= 1;
 					from += len;
-					p->fn(from);
-
+					if (p->fn(from) < 0) {
+						from = before;
+						break;
+					}
 					while (*from != ' ' && *from != '\0')
 						from++;
 					break;

_