Skip to content

Commit

Permalink
MIPS: Avoid future duplicate elf core header reservation
Browse files Browse the repository at this point in the history
Prepare for early_init_fdt_scan_reserved_mem() reserving the memory
occupied by an elf core header described in the device tree.
As arch_mem_init() calls early_init_fdt_scan_reserved_mem() before
mips_reserve_vmcore(), the latter needs to check if the memory has
already been reserved before.

Note that mips_reserve_vmcore() cannot just be removed, as not all MIPS
systems use DT.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
  • Loading branch information
geertu authored and intel-lab-lkp committed Aug 11, 2021
1 parent 4868ae2 commit e3a0dd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/mips/kernel/setup.c
Expand Up @@ -429,7 +429,8 @@ static void __init mips_reserve_vmcore(void)
pr_info("Reserving %ldKB of memory at %ldKB for kdump\n",
(unsigned long)elfcorehdr_size >> 10, (unsigned long)elfcorehdr_addr >> 10);

memblock_reserve(elfcorehdr_addr, elfcorehdr_size);
if (!memblock_is_region_reserved(elfcorehdr_addr, elfcorehdr_size)
memblock_reserve(elfcorehdr_addr, elfcorehdr_size);
#endif
}

Expand Down

0 comments on commit e3a0dd2

Please sign in to comment.