Message ID | 20201230102322.176313-3-chenzhou10@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: mm: reserve CMA and crashkernel in ZONE_DMA if enabled | expand |
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 7b9809e39927..64a0e8f551d6 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -403,8 +403,6 @@ void __init arm64_memblock_init(void) reserve_elfcorehdr(); high_memory = __va(memblock_end_of_DRAM() - 1) + 1; - - dma_contiguous_reserve(arm64_dma32_phys_limit); } void __init bootmem_init(void) @@ -445,6 +443,8 @@ void __init bootmem_init(void) */ reserve_crashkernel(); + dma_contiguous_reserve(arm64_dma32_phys_limit); + memblock_dump_all(); }
Like crashkernel, CMA might also reserve memory located in ZONE_DMA, so move dma_contiguous_reserve() to bootmem_init() to make sure that arm64_dma_phys_limit is populated. Just place dma_contiguous_reserve() after reserve_crashkernel() as before. Signed-off-by: Chen Zhou <chenzhou10@huawei.com> Suggested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> --- arch/arm64/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)