aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:32 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:32 -0400
commit2c8c0e6b8d7700a990da8d24eff767f9ca223b96 (patch)
treeb5477ee2558efff235c483d1619ce892db479d18 /arch/x86_64/kernel/machine_kexec.c
parent1a3f239ddf9208f2e52d36fef1c1c4518cbbbabe (diff)
[PATCH] Convert x86-64 to early param
Instead of hackish manual parsing Requires earlier i386 patchkit, but also fixes i386 early_printk again. I removed some obsolete really early parameters which didn't do anything useful. Also made a few parameters that needed it early (mostly oops printing setup) Also removed one panic check that wasn't visible without early console anyways (the early console is now initialized after that panic) This cleans up a lot of code. Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/machine_kexec.c')
-rw-r--r--arch/x86_64/kernel/machine_kexec.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/machine_kexec.c b/arch/x86_64/kernel/machine_kexec.c
index 106076b370fc..2e94c072d84a 100644
--- a/arch/x86_64/kernel/machine_kexec.c
+++ b/arch/x86_64/kernel/machine_kexec.c
@@ -226,3 +226,31 @@ NORET_TYPE void machine_kexec(struct kimage *image)
226 rnk = (relocate_new_kernel_t) control_code_buffer; 226 rnk = (relocate_new_kernel_t) control_code_buffer;
227 (*rnk)(page_list, control_code_buffer, image->start, start_pgtable); 227 (*rnk)(page_list, control_code_buffer, image->start, start_pgtable);
228} 228}
229
230/* crashkernel=size@addr specifies the location to reserve for
231 * a crash kernel. By reserving this memory we guarantee
232 * that linux never set's it up as a DMA target.
233 * Useful for holding code to do something appropriate
234 * after a kernel panic.
235 */
236static int __init setup_crashkernel(char *arg)
237{
238 unsigned long size, base;
239 char *p;
240 if (!arg)
241 return -EINVAL;
242 size = memparse(arg, &p);
243 if (arg == p)
244 return -EINVAL;
245 if (*p == '@') {
246 base = memparse(p+1, &p);
247 /* FIXME: Do I want a sanity check to validate the
248 * memory range? Yes you do, but it's too early for
249 * e820 -AK */
250 crashk_res.start = base;
251 crashk_res.end = base + size - 1;
252 }
253 return 0;
254}
255early_param("crashkernel", setup_crashkernel);
256