From: Chen Zhou <chenzhou10@huawei.com>
To: <catalin.marinas@arm.com>, <will@kernel.org>
Cc: <ardb@kernel.org>, <akpm@linux-foundation.org>,
<nsaenzjulienne@suse.de>, <rppt@kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <chenzhou10@huawei.com>,
<guohanjun@huawei.com>, <huawei.libin@huawei.com>
Subject: [PATCH v2 2/3] arm64: mm: move dma_contiguous_reserve() to bootmem_init()
Date: Wed, 30 Dec 2020 18:23:21 +0800 [thread overview]
Message-ID: <20201230102322.176313-3-chenzhou10@huawei.com> (raw)
In-Reply-To: <20201230102322.176313-1-chenzhou10@huawei.com>
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(-)
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
next prev parent reply other threads:[~2020-12-30 10:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 10:23 [PATCH v2 0/3] arm64: mm: reserve CMA and crashkernel in ZONE_DMA if enabled Chen Zhou
2020-12-30 10:23 ` [PATCH v2 1/3] arm64: mm: update the comments about ZONE_DMA Chen Zhou
2020-12-30 10:23 ` Chen Zhou [this message]
2020-12-30 10:23 ` [PATCH v2 3/3] arm64: mm: reserve CMA and crashkernel in ZONE_DMA if enabled Chen Zhou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201230102322.176313-3-chenzhou10@huawei.com \
--to=chenzhou10@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=guohanjun@huawei.com \
--cc=huawei.libin@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nsaenzjulienne@suse.de \
--cc=rppt@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®