diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/setup.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index bf89e0a59b88..b11a238b2e35 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -502,6 +502,7 @@ static inline unsigned long long get_total_mem(void) | |||
502 | return total << PAGE_SHIFT; | 502 | return total << PAGE_SHIFT; |
503 | } | 503 | } |
504 | 504 | ||
505 | #define DEFAULT_BZIMAGE_ADDR_MAX 0x37FFFFFF | ||
505 | static void __init reserve_crashkernel(void) | 506 | static void __init reserve_crashkernel(void) |
506 | { | 507 | { |
507 | unsigned long long total_mem; | 508 | unsigned long long total_mem; |
@@ -519,8 +520,12 @@ static void __init reserve_crashkernel(void) | |||
519 | if (crash_base <= 0) { | 520 | if (crash_base <= 0) { |
520 | const unsigned long long alignment = 16<<20; /* 16M */ | 521 | const unsigned long long alignment = 16<<20; /* 16M */ |
521 | 522 | ||
522 | crash_base = memblock_find_in_range(alignment, ULONG_MAX, crash_size, | 523 | /* |
523 | alignment); | 524 | * kexec want bzImage is below DEFAULT_BZIMAGE_ADDR_MAX |
525 | */ | ||
526 | crash_base = memblock_find_in_range(alignment, | ||
527 | DEFAULT_BZIMAGE_ADDR_MAX, crash_size, alignment); | ||
528 | |||
524 | if (crash_base == MEMBLOCK_ERROR) { | 529 | if (crash_base == MEMBLOCK_ERROR) { |
525 | pr_info("crashkernel reservation failed - No suitable area found.\n"); | 530 | pr_info("crashkernel reservation failed - No suitable area found.\n"); |
526 | return; | 531 | return; |
@@ -528,8 +533,8 @@ static void __init reserve_crashkernel(void) | |||
528 | } else { | 533 | } else { |
529 | unsigned long long start; | 534 | unsigned long long start; |
530 | 535 | ||
531 | start = memblock_find_in_range(crash_base, ULONG_MAX, crash_size, | 536 | start = memblock_find_in_range(crash_base, |
532 | 1<<20); | 537 | crash_base + crash_size, crash_size, 1<<20); |
533 | if (start != crash_base) { | 538 | if (start != crash_base) { |
534 | pr_info("crashkernel reservation failed - memory is in use.\n"); | 539 | pr_info("crashkernel reservation failed - memory is in use.\n"); |
535 | return; | 540 | return; |