@@ -674,15 +674,20 @@ static void __init reserve_crashkernel(void)
{
unsigned long long crash_size, crash_base;
unsigned long long total_mem;
+ unsigned long limit = 0;
int ret;
total_mem = get_total_mem();
ret = parse_crashkernel(boot_command_line, total_mem,
&crash_size, &crash_base);
- if (ret)
+ if (ret != 0 || crash_size == 0)
return;
- ret = reserve_bootmem(crash_base, crash_size, BOOTMEM_EXCLUSIVE);
+ if (crash_base != 0)
+ limit = crash_base + crash_size;
+
+ ret = ___alloc_bootmem_node_nopanic(NODE_DATA(0), crash_size,
+ PAGE_ALIGN, crash_base, limit);
if (ret < 0) {
printk(KERN_WARNING "crashkernel reservation failed - "
"memory is in use (0x%lx)\n", (unsigned long)crash_base);
For crashkernel, specific address should be reserved. It can be achived by reserve_bootmem(), but this function is only for bootmem. Now, we try to enable nobootmem, therfore change it more general function, ___alloc_bootmem_node_nopanic(). It can be use for both, bootmem and nobootmem. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>