Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp7718284pxu; Sat, 26 Dec 2020 02:36:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfzHgAD5ghyZjqLP+eWthbxyySQF22vlIr6CuNC6rKhKl8QLmwC/VcUXg413nV6ei4cBsp X-Received: by 2002:a17:906:d146:: with SMTP id br6mr34022021ejb.331.1608978990697; Sat, 26 Dec 2020 02:36:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608978990; cv=none; d=google.com; s=arc-20160816; b=gkUoo5rdUOJdsbH+Txys5BzY1/hByB860rfD4T8ABtpHW/xV1+SQkSOY3Xjl1BkNyT fhb35CYT9wPrRC3ynlMaJNsVCL6GHUIjGf1Tz5R9fC2qXBVlHuUMGZVg+Fuybk6Idj5V kYFbH+q3d5VqYS8YW3iyoHmFy9Ch634hTer+JIbE052Pg44JS/eDR7EngWTJtJ7Njgwu wLDbmEa+qZpgCjUp1GZ2S5yG8Ap05wbw/wxGScqvTZ+WHftEXwHaCPrhD4JJcKXxtGVI ++5qckasec73yfK+xK/2Fl2CsMVXtGy7Butf/+Yy27/jg4pKfgo/23G/wUQaGf8X1pS4 m4vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :date:cc:to:from:subject:message-id; bh=wM9LaH3CRSWiMdR7RYWYDgPZhXIME8bqAw2bgG4Dm6o=; b=zHncb4b99U6VjFmmU8JHlaElI3eBGD9cka+8UW7IGbuYDmn3zQD/o6bSZGiCRTy80l TDGIf2ndK1ghDZQITux3WPZZvzV31pNsCx4/57aaFVyttUgzZfEcxu707Y2EtKimKR7i 1hwvWsSLLFSVCXux7Ay6g06Clo4sBlX3dWVDiZz6YiJQSrWdizln/R3u+5DGcwn1ZuAU BdOX3p46UOC3vGHudj6URZGgWTEZhxphbH3/dRvaPjm59Jg+m9d35HH/R+FdBhJ7ZHGy oClZbQU2ZF0F3f+9MM3ufQWZnGpxVvFqyC2WLSrH4jfm14c4GH0ydG9IWfkqHWuGgf52 S4iQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z21si16270101ejj.256.2020.12.26.02.36.08; Sat, 26 Dec 2020 02:36:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725997AbgLZKfm (ORCPT + 99 others); Sat, 26 Dec 2020 05:35:42 -0500 Received: from mx2.suse.de ([195.135.220.15]:38202 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbgLZKfl (ORCPT ); Sat, 26 Dec 2020 05:35:41 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5EC79AD0F; Sat, 26 Dec 2020 10:35:00 +0000 (UTC) Message-ID: <653d43ed326e6a3974660c0ca2ad8a847a4ff986.camel@suse.de> Subject: Re: [PATCH 2/2] arm64: mm: fix kdump broken with ZONE_DMA reintroduced From: Nicolas Saenz Julienne To: Chen Zhou , 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 Date: Sat, 26 Dec 2020 11:34:58 +0100 In-Reply-To: <20201226033557.116251-3-chenzhou10@huawei.com> References: <20201226033557.116251-1-chenzhou10@huawei.com> <20201226033557.116251-3-chenzhou10@huawei.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-ttraNiikuS3d3EHqG2nf" User-Agent: Evolution 3.38.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-ttraNiikuS3d3EHqG2nf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. >=20 > Fix this by reserving low memory in ZONE_DMA if CONFIG_ZONE_DMA is > enabled, otherwise, reserving in ZONE_DMA32. >=20 > Fixes: bff3b04460a8 ("arm64: mm: reserve CMA and crashkernel in ZONE_DMA3= 2") I'm not so sure this counts as a fix, if someone backports it it'll probabl= y break things as it depends on the series that dynamically sizes DMA zones. > 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. Regards, Nicolas > =C2=A0arch/arm64/mm/init.c | 3 ++- > =C2=A01 file changed, 2 insertions(+), 1 deletion(-) >=20 > 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) > =C2=A0 >=20 > =C2=A0 if (crash_base =3D=3D 0) { > =C2=A0 /* Current arm64 boot protocol requires 2MB alignment */ > - crash_base =3D memblock_find_in_range(0, arm64_dma32_phys_limit, > + crash_base =3D memblock_find_in_range(0, > + arm64_dma_phys_limit ? : arm64_dma32_phys_limit, > =C2=A0 crash_size, SZ_2M); > =C2=A0 if (crash_base =3D=3D 0) { > =C2=A0 pr_warn("cannot allocate crashkernel (size:0x%llx)\n", --=-ttraNiikuS3d3EHqG2nf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl/nEdIACgkQlfZmHno8 x/58fAgAo/JlSNiKD9iXK2qb3QBSd4FhVpD5uFEaRPFGZJ2gROTApl9USk8jOMSS cr6z6lVl9fw+MD6xN2ceEPAFIMzlrurME4WUgZMcFoN0gLRAcW9iAlQUCQh+offk 22zl7NwD8fUYmtpWZIa3J72Ycol9q7aUotz62jcurryjO7tw1a6x3yUV2oyVJ2fq gH+k7ozVZowGWWyW3vWU66kq7pFUuKxA/2ruehWI1cfFYardeVGpDYQTCZgerxSH O73DfB9WdPMSz/iJFau8Nvj5/Jn/bmNlN7hLhcKgzf7kH+PKkLKtTAGQRMpHW33m oVYuRWBQN8vbtkK4q8d/+n1HI3CZwg== =0ERD -----END PGP SIGNATURE----- --=-ttraNiikuS3d3EHqG2nf--