diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2006-09-26 04:52:32 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:32 -0400 |
commit | 1a3f239ddf9208f2e52d36fef1c1c4518cbbbabe (patch) | |
tree | f2ad21f766102540e15ea61145e94be65901e272 /arch/i386/kernel/machine_kexec.c | |
parent | 33df0d19ea425d28bd5afb48898af32237fe81af (diff) |
[PATCH] i386: Replace i386 open-coded cmdline parsing with
This patch replaces the open-coded early commandline parsing
throughout the i386 boot code with the generic mechanism (already used
by ppc, powerpc, ia64 and s390). The code was inconsistent with
whether it deletes the option from the cmdline or not, meaning some of
these will get passed through the environment into init.
This transformation is mainly mechanical, but there are some notable
parts:
1) Grammar: s/linux never set's it up/linux never sets it up/
2) Remove hacked-in earlyprintk= option scanning. When someone
actually implements CONFIG_EARLY_PRINTK, then they can use
early_param().
[AK: actually it is implemented, but I'm adding the early_param it in the next
x86-64 patch]
3) Move declaration of generic_apic_probe() from setup.c into asm/apic.h
4) Various parameters now moved into their appropriate files (thanks Andi).
5) All parse functions which examine arg need to check for NULL,
except one where it has subtle humor value.
AK: readded acpi_sci handling which was completely dropped
AK: moved some more variables into acpi/boot.c
Cc: len.brown@intel.com
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/kernel/machine_kexec.c')
-rw-r--r-- | arch/i386/kernel/machine_kexec.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/i386/kernel/machine_kexec.c b/arch/i386/kernel/machine_kexec.c index 6b1ae6ba76f0..66c3dc99a655 100644 --- a/arch/i386/kernel/machine_kexec.c +++ b/arch/i386/kernel/machine_kexec.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/kexec.h> | 10 | #include <linux/kexec.h> |
11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
12 | #include <linux/init.h> | ||
12 | #include <asm/pgtable.h> | 13 | #include <asm/pgtable.h> |
13 | #include <asm/pgalloc.h> | 14 | #include <asm/pgalloc.h> |
14 | #include <asm/tlbflush.h> | 15 | #include <asm/tlbflush.h> |
@@ -209,3 +210,25 @@ NORET_TYPE void machine_kexec(struct kimage *image) | |||
209 | rnk = (relocate_new_kernel_t) reboot_code_buffer; | 210 | rnk = (relocate_new_kernel_t) reboot_code_buffer; |
210 | (*rnk)(page_list, reboot_code_buffer, image->start, cpu_has_pae); | 211 | (*rnk)(page_list, reboot_code_buffer, image->start, cpu_has_pae); |
211 | } | 212 | } |
213 | |||
214 | /* crashkernel=size@addr specifies the location to reserve for | ||
215 | * a crash kernel. By reserving this memory we guarantee | ||
216 | * that linux never sets it up as a DMA target. | ||
217 | * Useful for holding code to do something appropriate | ||
218 | * after a kernel panic. | ||
219 | */ | ||
220 | static int __init parse_crashkernel(char *arg) | ||
221 | { | ||
222 | unsigned long size, base; | ||
223 | size = memparse(arg, &arg); | ||
224 | if (*arg == '@') { | ||
225 | base = memparse(arg+1, &arg); | ||
226 | /* FIXME: Do I want a sanity check | ||
227 | * to validate the memory range? | ||
228 | */ | ||
229 | crashk_res.start = base; | ||
230 | crashk_res.end = base + size - 1; | ||
231 | } | ||
232 | return 0; | ||
233 | } | ||
234 | early_param("crashkernel", parse_crashkernel); | ||