Skip to content

Commit

Permalink
arm64: mm: Move reserve_crashkernel() into mem_init()
Browse files Browse the repository at this point in the history
crashkernel might reserve memory located in ZONE_DMA. We plan to delay
ZONE_DMA's initialization after unflattening the devicetree and ACPI's
boot table initialization, so move it later in the boot process.
Specifically into bootmem_init() since request_standard_resources()
depends on it.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tested-by: Jeremy Linton <jeremy.linton@arm.com>
Link: https://lore.kernel.org/r/20201119175400.9995-2-nsaenzjulienne@suse.de
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Nicolas Saenz Julienne authored and Catalin Marinas committed Nov 20, 2020
1 parent 2687275 commit 0a30c53
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/arm64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,6 @@ void __init arm64_memblock_init(void)
else
arm64_dma32_phys_limit = PHYS_MASK + 1;

reserve_crashkernel();

reserve_elfcorehdr();

high_memory = __va(memblock_end_of_DRAM() - 1) + 1;
Expand Down Expand Up @@ -434,6 +432,12 @@ void __init bootmem_init(void)
sparse_init();
zone_sizes_init(min, max);

/*
* request_standard_resources() depends on crashkernel's memory being
* reserved, so do it here.
*/
reserve_crashkernel();

memblock_dump_all();
}

Expand Down

0 comments on commit 0a30c53

Please sign in to comment.