[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201230102322.176313-3-chenzhou10@huawei.com>
Date: Wed, 30 Dec 2020 18:23:21 +0800
From: Chen Zhou <chenzhou10@...wei.com>
To: <catalin.marinas@....com>, <will@...nel.org>
CC: <ardb@...nel.org>, <akpm@...ux-foundation.org>,
<nsaenzjulienne@...e.de>, <rppt@...nel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <chenzhou10@...wei.com>,
<guohanjun@...wei.com>, <huawei.libin@...wei.com>
Subject: [PATCH v2 2/3] arm64: mm: move dma_contiguous_reserve() to bootmem_init()
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@...wei.com>
Suggested-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
---
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 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();
}
--
2.20.1
Powered by blists - more mailing lists