diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-25 20:57:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 07:10:51 -0400 |
commit | ccb4defa71744f086822950d8fa64a17c4e6eb04 (patch) | |
tree | 3afcc819b85b4b7cdbd153c543b4f60b4db9d488 /arch/x86/kernel/setup_percpu.c | |
parent | 257b0fde99df0160db03e529dbfb3a4e46c07a88 (diff) |
x86: move back crashkernel back to setup.c
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup_percpu.c')
-rw-r--r-- | arch/x86/kernel/setup_percpu.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index 2f807503e030..a3a19ab0edef 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c | |||
@@ -387,63 +387,6 @@ EXPORT_SYMBOL(node_to_cpumask); | |||
387 | 387 | ||
388 | #endif /* X86_64_NUMA */ | 388 | #endif /* X86_64_NUMA */ |
389 | 389 | ||
390 | |||
391 | /* | ||
392 | * --------- Crashkernel reservation ------------------------------ | ||
393 | */ | ||
394 | |||
395 | static inline unsigned long long get_total_mem(void) | ||
396 | { | ||
397 | unsigned long long total; | ||
398 | |||
399 | total = max_low_pfn - min_low_pfn; | ||
400 | #ifdef CONFIG_HIGHMEM | ||
401 | total += highend_pfn - highstart_pfn; | ||
402 | #endif | ||
403 | |||
404 | return total << PAGE_SHIFT; | ||
405 | } | ||
406 | |||
407 | #ifdef CONFIG_KEXEC | ||
408 | void __init reserve_crashkernel(void) | ||
409 | { | ||
410 | unsigned long long total_mem; | ||
411 | unsigned long long crash_size, crash_base; | ||
412 | int ret; | ||
413 | |||
414 | total_mem = get_total_mem(); | ||
415 | |||
416 | ret = parse_crashkernel(boot_command_line, total_mem, | ||
417 | &crash_size, &crash_base); | ||
418 | if (ret == 0 && crash_size > 0) { | ||
419 | if (crash_base <= 0) { | ||
420 | printk(KERN_INFO "crashkernel reservation failed - " | ||
421 | "you have to specify a base address\n"); | ||
422 | return; | ||
423 | } | ||
424 | |||
425 | if (reserve_bootmem_generic(crash_base, crash_size, | ||
426 | BOOTMEM_EXCLUSIVE) < 0) { | ||
427 | printk(KERN_INFO "crashkernel reservation failed - " | ||
428 | "memory is in use\n"); | ||
429 | return; | ||
430 | } | ||
431 | |||
432 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | ||
433 | "for crashkernel (System RAM: %ldMB)\n", | ||
434 | (unsigned long)(crash_size >> 20), | ||
435 | (unsigned long)(crash_base >> 20), | ||
436 | (unsigned long)(total_mem >> 20)); | ||
437 | |||
438 | crashk_res.start = crash_base; | ||
439 | crashk_res.end = crash_base + crash_size - 1; | ||
440 | insert_resource(&iomem_resource, &crashk_res); | ||
441 | } | ||
442 | } | ||
443 | #else | ||
444 | void __init reserve_crashkernel(void) | ||
445 | {} | ||
446 | #endif | ||
447 | static struct resource standard_io_resources[] = { | 390 | static struct resource standard_io_resources[] = { |
448 | { .name = "dma1", .start = 0x00, .end = 0x1f, | 391 | { .name = "dma1", .start = 0x00, .end = 0x1f, |
449 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | 392 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, |