From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80840C433E0 for ; Mon, 28 Dec 2020 07:35:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3EE4621D94 for ; Mon, 28 Dec 2020 07:35:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3EE4621D94 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FUBUSZ+mfNPIhq4jsakHC4eUOl3611ABzgP3vWojxOc=; b=nVy2Prnv4eDfKzx+rgS+nRMr5 axQyPCzZ9dDDlraB0IeDErF3Gh/mXFTYM7OySLUpXWmF+Ju/HzimrOCjb38S5BcsNTQOgSxcy1wbn mJ5r/GaLIv7SMB+4svVss2T7mkMsute3yISA5OtdVofVrxyNCoxXVkr36jN1GtaBW37bHx+6lI6sa wKJ+zWz/UHdSqlK5yxOFrf4U//jjco1osLRUG4OZanHsyw1kGhnXfr008TlDLfB8++mK/GsQUcZTY FJdNAuNgJHWXIZm6NRPMj5beV92aiopQWwroQw6MhIykuK6vhQink1lXmU+ZRXYCabiKPMzZZbqzC DwxoryLCQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktn1q-0005xR-Sl; Mon, 28 Dec 2020 07:33:18 +0000 Received: from szxga04-in.huawei.com ([45.249.212.190]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktn1n-0005wX-3n for linux-arm-kernel@lists.infradead.org; Mon, 28 Dec 2020 07:33:16 +0000 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4D48Q04dk6z15kqm; Mon, 28 Dec 2020 15:32:08 +0800 (CST) Received: from [10.174.176.61] (10.174.176.61) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Mon, 28 Dec 2020 15:32:50 +0800 Subject: Re: [PATCH 2/2] arm64: mm: fix kdump broken with ZONE_DMA reintroduced To: Nicolas Saenz Julienne , , References: <20201226033557.116251-1-chenzhou10@huawei.com> <20201226033557.116251-3-chenzhou10@huawei.com> <653d43ed326e6a3974660c0ca2ad8a847a4ff986.camel@suse.de> From: chenzhou Message-ID: Date: Mon, 28 Dec 2020 15:32:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <653d43ed326e6a3974660c0ca2ad8a847a4ff986.camel@suse.de> X-Originating-IP: [10.174.176.61] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201228_023315_705972_2CE0FDDA X-CRM114-Status: GOOD ( 17.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: song.bao.hua@hisilicon.com, xiexiuqi@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, huawei.libin@huawei.com, akpm@linux-foundation.org, ardb@kernel.org, rppt@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 >> --- > 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", > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel