Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212741
b: refs/heads/master
c: 9f4c139
h: refs/heads/master
i:
  212739: f540b5f
v: v3
  • Loading branch information
Yinghai Lu authored and H. Peter Anvin committed Oct 6, 2010
1 parent d9f7ad4 commit f8b3e80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c996361ef0d02ef8c1435902c909d14195adcdc
refs/heads/master: 9f4c13964b58608fbce05540743281ea3146c0e8
13 changes: 9 additions & 4 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ static inline unsigned long long get_total_mem(void)
return total << PAGE_SHIFT;
}

#define DEFAULT_BZIMAGE_ADDR_MAX 0x37FFFFFF
static void __init reserve_crashkernel(void)
{
unsigned long long total_mem;
Expand All @@ -519,17 +520,21 @@ static void __init reserve_crashkernel(void)
if (crash_base <= 0) {
const unsigned long long alignment = 16<<20; /* 16M */

crash_base = memblock_find_in_range(alignment, ULONG_MAX, crash_size,
alignment);
/*
* kexec want bzImage is below DEFAULT_BZIMAGE_ADDR_MAX
*/
crash_base = memblock_find_in_range(alignment,
DEFAULT_BZIMAGE_ADDR_MAX, crash_size, alignment);

if (crash_base == MEMBLOCK_ERROR) {
pr_info("crashkernel reservation failed - No suitable area found.\n");
return;
}
} else {
unsigned long long start;

start = memblock_find_in_range(crash_base, ULONG_MAX, crash_size,
1<<20);
start = memblock_find_in_range(crash_base,
crash_base + crash_size, crash_size, 1<<20);
if (start != crash_base) {
pr_info("crashkernel reservation failed - memory is in use.\n");
return;
Expand Down

0 comments on commit f8b3e80

Please sign in to comment.