c6c9801148de744a89ec1095c1e8b73daa668328
[openwrt/staging/ldir.git] /
1 From 67349176ca23f7525dee79665a880cde5aeeaf26 Mon Sep 17 00:00:00 2001
2 From: Nikhil Gupta <nikhil.gupta@nxp.com>
3 Date: Mon, 30 Dec 2019 15:11:23 +0530
4 Subject: [PATCH] arm64:move elfcorehdr reservation early for crash dump kernel
5
6 on some SOCs, elfcorehdr address may overlap with the address of reserved
7 memory allocated using early_init_fdt_scan_reserved_mem
8
9 Signed-off-by: Nikhil Gupta <nikhil.gupta@nxp.com>
10 Signed-off-by: Poonam Aggrwal <poonam.aggrwal@nxp.com>
11 ---
12 arch/arm64/mm/init.c | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15 --- a/arch/arm64/mm/init.c
16 +++ b/arch/arm64/mm/init.c
17 @@ -416,6 +416,8 @@ void __init arm64_memblock_init(void)
18 initrd_end = initrd_start + phys_initrd_size;
19 }
20
21 + reserve_elfcorehdr();
22 +
23 early_init_fdt_scan_reserved_mem();
24
25 /* 4GB maximum for 32-bit only capable devices */
26 @@ -426,8 +428,6 @@ void __init arm64_memblock_init(void)
27
28 reserve_crashkernel();
29
30 - reserve_elfcorehdr();
31 -
32 high_memory = __va(memblock_end_of_DRAM() - 1) + 1;
33
34 dma_contiguous_reserve(arm64_dma_phys_limit);