Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3098926rdh; Mon, 27 Nov 2023 06:31:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHVXBG8cgx8YRP/xz1yY34GkxShnFsjRdmm1efQCFvreNDNIbcPw85ItLZZVKGchHlmU1// X-Received: by 2002:a05:6870:40c5:b0:1fa:52f2:39dc with SMTP id l5-20020a05687040c500b001fa52f239dcmr4134539oal.12.1701095500137; Mon, 27 Nov 2023 06:31:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701095500; cv=none; d=google.com; s=arc-20160816; b=GWj5NSX9kCFjMwm22ND9PNphLGJQQICCoTyr088s0JiZFNjegGTpGtX9+uokyDRKsr KJ/wItVeTX+AjF/L6EOLe2KFqa1aZhhlw2mlFAQnI6rzGkuoQORBGhE0K32I3ah5xUMA 97xSHVMf/8Sy8pO/B+ERyiq76AJ1o8/1P+N9jaKeW9O2MF60OGZbISK3qWBgWWCIw5Yd YUMPBgziYGlxMqLxd8U0Qv7P7cO0B/viQLnv9OvGLFPnQj/HXDCiCwnaA7pRw9A049Yn iBMb6M27ksQGEGcL49ZXXZQjG+kbmeA+P3NnpE1YYkxSdbD/hymW9aIOvl/LUCPdVYDL yE4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yhykNXyZvalLGEmacnGcRuQpSVBCd7cLRjOG9XbiXxQ=; fh=9vgHZsvKCm3iD/mmA+rTFnbTIxIQfdb8KWJbhDiLk7A=; b=tLrOpomXu4lbsYDE++DLIQpMxjOTpZpm8Y9Q3aI0LL6pAkkY2/moLfiq+T0exdvxlD p6nmsxeqMP1hLpri57qk2Vhk3AMeIPgBsWTULDFfj97qfS5Y741BIGlGxcJ0wqisvTOa wYQKNSAc47w4QWvSMd0h/MrnsLvS0gD4qEuwHoJK0a5hfATNAVOtarQ2syYRXjx+Z9/M gSfZsxKt4LzxPMu1df4Apa+sTbu2BDky1n0g+N3R28nYWoupXUpKwrQllXP8y68d7wVn sFVuUCy/Fmrd0vgcOLUo9k1CWdHpFjbzuMpfprvbAu2S776iMOhO73apW4DpkBtF7ZWH yJEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=UDRdS5qW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id f11-20020a056871048b00b001e16cef72c9si3890734oaj.287.2023.11.27.06.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:31:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=UDRdS5qW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id CF45F8021FF1; Mon, 27 Nov 2023 06:31:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233805AbjK0ObX (ORCPT + 99 others); Mon, 27 Nov 2023 09:31:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233817AbjK0ObD (ORCPT ); Mon, 27 Nov 2023 09:31:03 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6EE5D4D for ; Mon, 27 Nov 2023 06:30:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1701095407; x=1732631407; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=yhykNXyZvalLGEmacnGcRuQpSVBCd7cLRjOG9XbiXxQ=; b=UDRdS5qW3ej+V/cFmSyUPMvVdcQWc+yumNmCMDIxd34JaV9qtXmwH8yf XkwOWNld1In2TBvVAPaNA1sEACINbpHRACeWwNmvJBkmVh9YRz/GgSSR7 NQXs+7HucndWX7RWWn+4esca+YRgW0FQZesmFeTQ78LjfFijBIVnTgzEY 3udZhv/KtIk63YaDSb2daaC+Y8Slee2T/T5ItrUBvW0qc8m/hQEBDFKuW L5hFcyaKGyzPjB6sfIXnAPZeEvZ6Imjh+BXSVcygyAjasCBL2/YwuLKX6 tIHZPXE5aWqkfX02OR0DBtJbzIx8Pqg3CxPczAW6baPL/97UyLzqtwSrZ A==; X-CSE-ConnectionGUID: aW6Vx/uASBWsmmLGNLaICw== X-CSE-MsgGUID: o7HKsLUXSMGfafdsAdFZ/g== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.04,231,1695711600"; d="asc'?scan'208";a="12260096" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 Nov 2023 07:30:01 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 27 Nov 2023 07:29:51 -0700 Received: from wendy (10.10.85.11) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Mon, 27 Nov 2023 07:29:49 -0700 Date: Mon, 27 Nov 2023 14:29:21 +0000 From: Conor Dooley To: Conor Dooley CC: Woody Zhang , Paul Walmsley , Palmer Dabbelt , Albert Ou , , , Subject: Re: [PATCH] riscv: reserve DTB before possible memblock allocation Message-ID: <20231127-trifle-film-2d8c940bab4f@wendy> References: <20230607-jogging-grudging-70dede86bc53@spud> <20230607-unruly-encore-e00661704b71@spud> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tXbrPhgYMyqKwY6U" Content-Disposition: inline In-Reply-To: <20230607-unruly-encore-e00661704b71@spud> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 27 Nov 2023 06:31:37 -0800 (PST) --tXbrPhgYMyqKwY6U Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 07, 2023 at 11:23:31PM +0100, Conor Dooley wrote: > On Thu, Jun 08, 2023 at 06:17:22AM +0800, Woody Zhang wrote: > > Hi, Conor > >=20 > > On Wed, Jun 07, 2023 at 07:17:28PM +0100, Conor Dooley wrote: > > >+CC Alex, you should take a look at this patch. > > > > > >On Wed, Jun 07, 2023 at 09:35:19PM +0800, Woody Zhang wrote: > > >> It's possible that early_init_fdt_scan_reserved_mem() allocates memo= ry > > >> from memblock for dynamic reserved memory in `/reserved-memory` node. > > >> Any fixed reservation must be done before that to avoid potential > > >> conflicts. > > >>=20 > > >> Reserve the DTB in memblock just after early scanning it. > > > > > >The rationale makes sense to me, I am just wondering what compelling > > >reason there is to move it away from the memblock_reserve()s for the > > >initd and vmlinux? Moving it above early_init_fdt_scan_reserved_mem() > > >should be the sufficient minimum & would keep things together. > >=20 > > IMO, moving it to parse_dtb() is more reasonable as early scanning and > > reservation are both subject to DTB. It can also lower the risk to > > mess up the sequence in the future. BTW, it's also invoked in > > setup_machine_fdt() in arm64. >=20 > I'm fine with the change either way, so: > Reviewed-by: Conor Dooley > Mostly wanted to know whether you'd considered the minimal change. What ever happened to this patch? --tXbrPhgYMyqKwY6U Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZWSnwQAKCRB4tDGHoIJi 0m/KAQDEuZxT5JfailGBMUXOcjT5I61ojfuXfoRX4qyhLfCZagEA48qNAd6QNeRx 30HhIlbePUXhEb/osu5NNXdRus1JQwY= =r2nN -----END PGP SIGNATURE----- --tXbrPhgYMyqKwY6U--