aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/admin-guide/kernel-parameters.txt7
-rw-r--r--arch/x86/kernel/setup.c22
2 files changed, 19 insertions, 10 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 2b8ee90bb644..24d01648edeb 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -704,8 +704,11 @@
704 upon panic. This parameter reserves the physical 704 upon panic. This parameter reserves the physical
705 memory region [offset, offset + size] for that kernel 705 memory region [offset, offset + size] for that kernel
706 image. If '@offset' is omitted, then a suitable offset 706 image. If '@offset' is omitted, then a suitable offset
707 is selected automatically. Check 707 is selected automatically.
708 Documentation/kdump/kdump.txt for further details. 708 [KNL, x86_64] select a region under 4G first, and
709 fall back to reserve region above 4G when '@offset'
710 hasn't been specified.
711 See Documentation/kdump/kdump.txt for further details.
709 712
710 crashkernel=range1:size1[,range2:size2,...][@offset] 713 crashkernel=range1:size1[,range2:size2,...][@offset]
711 [KNL] Same as above, but depends on the memory 714 [KNL] Same as above, but depends on the memory
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index daf7c5650c18..c15f362a2516 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -541,21 +541,27 @@ static void __init reserve_crashkernel(void)
541 } 541 }
542 542
543 /* 0 means: find the address automatically */ 543 /* 0 means: find the address automatically */
544 if (crash_base <= 0) { 544 if (!crash_base) {
545 /* 545 /*
546 * Set CRASH_ADDR_LOW_MAX upper bound for crash memory, 546 * Set CRASH_ADDR_LOW_MAX upper bound for crash memory,
547 * as old kexec-tools loads bzImage below that, unless 547 * crashkernel=x,high reserves memory over 4G, also allocates
548 * "crashkernel=size[KMG],high" is specified. 548 * 256M extra low memory for DMA buffers and swiotlb.
549 * But the extra memory is not required for all machines.
550 * So try low memory first and fall back to high memory
551 * unless "crashkernel=size[KMG],high" is specified.
549 */ 552 */
550 crash_base = memblock_find_in_range(CRASH_ALIGN, 553 if (!high)
551 high ? CRASH_ADDR_HIGH_MAX 554 crash_base = memblock_find_in_range(CRASH_ALIGN,
552 : CRASH_ADDR_LOW_MAX, 555 CRASH_ADDR_LOW_MAX,
553 crash_size, CRASH_ALIGN); 556 crash_size, CRASH_ALIGN);
557 if (!crash_base)
558 crash_base = memblock_find_in_range(CRASH_ALIGN,
559 CRASH_ADDR_HIGH_MAX,
560 crash_size, CRASH_ALIGN);
554 if (!crash_base) { 561 if (!crash_base) {
555 pr_info("crashkernel reservation failed - No suitable area found.\n"); 562 pr_info("crashkernel reservation failed - No suitable area found.\n");
556 return; 563 return;
557 } 564 }
558
559 } else { 565 } else {
560 unsigned long long start; 566 unsigned long long start;
561 567