aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/setup_32.c')
-rw-r--r--arch/x86/kernel/setup_32.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
index a9b19ad24edb..369d0fe1ff9c 100644
--- a/arch/x86/kernel/setup_32.c
+++ b/arch/x86/kernel/setup_32.c
@@ -429,59 +429,6 @@ extern unsigned long __init setup_memory(void);
429extern void zone_sizes_init(void); 429extern void zone_sizes_init(void);
430#endif /* !CONFIG_NEED_MULTIPLE_NODES */ 430#endif /* !CONFIG_NEED_MULTIPLE_NODES */
431 431
432static inline unsigned long long get_total_mem(void)
433{
434 unsigned long long total;
435
436 total = max_low_pfn - min_low_pfn;
437#ifdef CONFIG_HIGHMEM
438 total += highend_pfn - highstart_pfn;
439#endif
440
441 return total << PAGE_SHIFT;
442}
443
444#ifdef CONFIG_KEXEC
445static void __init reserve_crashkernel(void)
446{
447 unsigned long long total_mem;
448 unsigned long long crash_size, crash_base;
449 int ret;
450
451 total_mem = get_total_mem();
452
453 ret = parse_crashkernel(boot_command_line, total_mem,
454 &crash_size, &crash_base);
455 if (ret == 0 && crash_size > 0) {
456 if (crash_base <= 0) {
457 printk(KERN_INFO "crashkernel reservation failed - "
458 "you have to specify a base address\n");
459 return;
460 }
461
462 if (reserve_bootmem_generic(crash_base, crash_size,
463 BOOTMEM_EXCLUSIVE) < 0) {
464 printk(KERN_INFO "crashkernel reservation failed - "
465 "memory is in use\n");
466 return;
467 }
468
469 printk(KERN_INFO "Reserving %ldMB of memory at %ldMB "
470 "for crashkernel (System RAM: %ldMB)\n",
471 (unsigned long)(crash_size >> 20),
472 (unsigned long)(crash_base >> 20),
473 (unsigned long)(total_mem >> 20));
474
475 crashk_res.start = crash_base;
476 crashk_res.end = crash_base + crash_size - 1;
477 insert_resource(&iomem_resource, &crashk_res);
478 }
479}
480#else
481static inline void __init reserve_crashkernel(void)
482{}
483#endif
484
485#ifdef CONFIG_BLK_DEV_INITRD 432#ifdef CONFIG_BLK_DEV_INITRD
486 433
487static bool do_relocate_initrd = false; 434static bool do_relocate_initrd = false;