From: chenzhou <chenzhou10@huawei.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
<catalin.marinas@arm.com>, <will@kernel.org>
Cc: <ardb@kernel.org>, <akpm@linux-foundation.org>, <rppt@kernel.org>,
<song.bao.hua@hisilicon.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <huawei.libin@huawei.com>,
<xiexiuqi@huawei.com>
Subject: Re: [PATCH 2/2] arm64: mm: fix kdump broken with ZONE_DMA reintroduced
Date: Mon, 28 Dec 2020 15:32:35 +0800 [thread overview]
Message-ID: <deeb19d6-29e2-f76e-9e28-6ad77c7cb1fa@huawei.com> (raw)
In-Reply-To: <653d43ed326e6a3974660c0ca2ad8a847a4ff986.camel@suse.de>
Hi Nicolas,
Thanks for your review.
On 2020/12/26 18:34, Nicolas Saenz Julienne wrote:
> Hi Chen, thanks for looking at this.
>
> On Sat, 2020-12-26 at 11:35 +0800, Chen Zhou wrote:
>> If the memory reserved for crash dump kernel falled in ZONE_DMA32,
>> the devices in crash dump kernel need to use ZONE_DMA will alloc fail.
>>
>> Fix this by reserving low memory in ZONE_DMA if CONFIG_ZONE_DMA is
>> enabled, otherwise, reserving in ZONE_DMA32.
>>
>> Fixes: bff3b04460a8 ("arm64: mm: reserve CMA and crashkernel in ZONE_DMA32")
> I'm not so sure this counts as a fix, if someone backports it it'll probably
> break things as it depends on the series that dynamically sizes DMA zones.
I write this just because kdump is broken from this commit.
>
>> Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
>> ---
> Why not doing the same with CMA? You'll probably have to move the
> dma_contiguous_reserve() call into bootmem_init() so as to make sure that
> arm64_dma_phys_limit is populated.
You are right, CMA also need this. I will do this in next version.
Thanks,
Chen Zhou
>
> Regards,
> Nicolas
>
>> arch/arm64/mm/init.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
>> index 7b9809e39927..5074e945f1a6 100644
>> --- a/arch/arm64/mm/init.c
>> +++ b/arch/arm64/mm/init.c
>> @@ -85,7 +85,8 @@ static void __init reserve_crashkernel(void)
>>
>>
>> if (crash_base == 0) {
>> /* Current arm64 boot protocol requires 2MB alignment */
>> - crash_base = memblock_find_in_range(0, arm64_dma32_phys_limit,
>> + crash_base = memblock_find_in_range(0,
>> + arm64_dma_phys_limit ? : arm64_dma32_phys_limit,
>> crash_size, SZ_2M);
>> if (crash_base == 0) {
>> pr_warn("cannot allocate crashkernel (size:0x%llx)\n",
>
next prev parent reply other threads:[~2020-12-28 7:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-26 3:35 [PATCH 0/2] " Chen Zhou
2020-12-26 3:35 ` [PATCH 1/2] arm64: mm: update the comments about ZONE_DMA Chen Zhou
2020-12-26 10:35 ` Nicolas Saenz Julienne
2020-12-26 3:35 ` [PATCH 2/2] arm64: mm: fix kdump broken with ZONE_DMA reintroduced Chen Zhou
2020-12-26 10:34 ` Nicolas Saenz Julienne
2020-12-28 7:32 ` chenzhou [this message]
2021-01-07 18:34 ` Catalin Marinas
2021-01-07 14:25 ` Catalin Marinas
2021-01-08 1:09 ` chenzhou
2021-01-20 12:40 ` [PATCH 0/2] " Will Deacon
2021-01-20 13:07 ` Catalin Marinas
2021-01-21 2:37 ` chenzhou
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=deeb19d6-29e2-f76e-9e28-6ad77c7cb1fa@huawei.com \
--to=chenzhou10@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.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=song.bao.hua@hisilicon.com \
--cc=will@kernel.org \
--cc=xiexiuqi@huawei.com \
/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®