aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <[email protected]>2020-11-19 18:53:53 +0100
committerCatalin Marinas <[email protected]>2020-11-20 09:34:13 +0000
commit0a30c53573b07d5561457e41fb0ab046cd857da5 (patch)
tree5b72c74c92d97455000a38e9917be470a4bcb8c6
parent2687275a5843d1089687f08fc64eb3f3b026a169 (diff)
arm64: mm: Move reserve_crashkernel() into mem_init()
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 <[email protected]> Tested-by: Jeremy Linton <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
-rw-r--r--arch/arm64/mm/init.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 6be62c5bc0a3..5cae22be54fa 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -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;
@@ -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();
}