From 6745315419b8aa468afab98b02677af9e3d717de Mon Sep 17 00:00:00 2001 From: Nikhil Gupta Date: Tue, 9 Mar 2021 09:37:46 +0530 Subject: [PATCH] LF-3296-1 arm64:move elfcorehdr reservation early for crash dump kernel elfcorehdr_addr is fixed address passed to 2nd kernel which may be conflicted with potential reserved memory in 2nd kernel,so reserve_elfcorehdr() ahead of early_init_fdt_scan_reserved_mem() can relieve this situation. Signed-off-by: Nikhil Gupta Signed-off-by: Poonam Aggrwal Reviewed-by: Priyanka Jain Reviewed-by: Aisheng Dong --- arch/arm64/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index f1758fc60b55..32ad659114e9 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -398,6 +398,8 @@ void __init arm64_memblock_init(void) initrd_end = initrd_start + phys_initrd_size; } + reserve_elfcorehdr(); + early_init_fdt_scan_reserved_mem(); if (IS_ENABLED(CONFIG_ZONE_DMA32)) @@ -405,8 +407,6 @@ void __init arm64_memblock_init(void) else arm64_dma32_phys_limit = PHYS_MASK + 1; - reserve_elfcorehdr(); - high_memory = __va(memblock_end_of_DRAM() - 1) + 1; dma_contiguous_reserve(arm64_dma32_phys_limit); -- 2.17.1