@@ -655,14 +655,6 @@ static int __init init_machine_late(void)
late_initcall(init_machine_late);
#ifdef CONFIG_KEXEC
-static inline unsigned long long get_total_mem(void)
-{
- unsigned long total;
-
- total = max_low_pfn - min_low_pfn;
- return total << PAGE_SHIFT;
-}
-
/**
* reserve_crashkernel() - reserves memory are for crash kernel
*
@@ -677,7 +669,7 @@ static void __init reserve_crashkernel(void)
unsigned long limit = 0;
int ret;
- total_mem = get_total_mem();
+ total_mem = memblock_phys_mem_size();
ret = parse_crashkernel(boot_command_line, total_mem,
&crash_size, &crash_base);
if (ret != 0 || crash_size == 0)
There is some platforms which have highmem, so this equation doesn't represent total_mem size properly. In addition, max_low_pfn's meaning is different in other architecture and it is scheduled to be changed, so remove related code to max_low_pfn. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>