aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel/setup.c')
-rw-r--r--arch/ia64/kernel/setup.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index de636b215677..916ba898237f 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -352,7 +352,7 @@ reserve_memory (void)
352 } 352 }
353#endif 353#endif
354 354
355#ifdef CONFIG_PROC_VMCORE 355#ifdef CONFIG_CRASH_KERNEL
356 if (reserve_elfcorehdr(&rsvd_region[n].start, 356 if (reserve_elfcorehdr(&rsvd_region[n].start,
357 &rsvd_region[n].end) == 0) 357 &rsvd_region[n].end) == 0)
358 n++; 358 n++;
@@ -478,7 +478,12 @@ static __init int setup_nomca(char *s)
478} 478}
479early_param("nomca", setup_nomca); 479early_param("nomca", setup_nomca);
480 480
481#ifdef CONFIG_PROC_VMCORE 481/*
482 * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
483 * is_kdump_kernel() to determine if we are booting after a panic. Hence
484 * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
485 */
486#ifdef CONFIG_CRASH_DUMP
482/* elfcorehdr= specifies the location of elf core header 487/* elfcorehdr= specifies the location of elf core header
483 * stored by the crashed kernel. 488 * stored by the crashed kernel.
484 */ 489 */
@@ -502,11 +507,11 @@ int __init reserve_elfcorehdr(unsigned long *start, unsigned long *end)
502 * to work properly. 507 * to work properly.
503 */ 508 */
504 509
505 if (elfcorehdr_addr >= ELFCORE_ADDR_MAX) 510 if (!is_vmcore_usable())
506 return -EINVAL; 511 return -EINVAL;
507 512
508 if ((length = vmcore_find_descriptor_size(elfcorehdr_addr)) == 0) { 513 if ((length = vmcore_find_descriptor_size(elfcorehdr_addr)) == 0) {
509 elfcorehdr_addr = ELFCORE_ADDR_MAX; 514 vmcore_unusable();
510 return -EINVAL; 515 return -EINVAL;
511 } 516 }
512 517