From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 903AA8C1A; Mon, 23 Sep 2024 18:13:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727115230; cv=none; b=V6NZzzDzaI0kqBBdSnq6pPGfTnnt4hNoUUEy5f/fCjthnvuPVHSoacw3P35sLATCHBQ0z4aGcjWLVbb52I7QsM3jvBlYofby66Q59kPGjLLOvhR6IabB1+UUZjI8yIEsj5g5EmJK+RbaxqWyd0lYmQM0HR9YKnm8MtyeHkEidkc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727115230; c=relaxed/simple; bh=1WyhULVRVV/rtdeWwTQ2M9+nk7WPwcxLgUiEtp966xs=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=CyT7WovSano8luJSnKcMFl/ShOd7t2IRz0+H4xK2jI0SK4cnvwIIDj5r+lXitUty+QCoMc+dEWri4qJy8wDpNGpWtJpghI7EIUszQzlr3eeItMzSrKhzUUGNLxTWVXfH1Dh+RzNAdfUuEdo83exrKoF+iNpMS166TaI+gsqbYno= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G4/ZLxs9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="G4/ZLxs9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 028FBC4CEC4; Mon, 23 Sep 2024 18:13:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727115230; bh=1WyhULVRVV/rtdeWwTQ2M9+nk7WPwcxLgUiEtp966xs=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=G4/ZLxs9Q4D9kEnETKRLoXRmkGqSdWz+iEY0I8D29Y4fabg07BpYqGOhriher+Mng U+fIDfjEsaZayJijn1WSK8tqgfLBt4AmkijpC7CBOoOxRd3b0KeDpSTafSii3pPPDZ QuUDEXmpBiY7A+Admls8DVdsTim1Xhf0318L5l2f1bv+lPtBzrseo385Y5DguGwap/ dGUePuLxl8uU02UjtfmXxS51GXMAPXuNEHtATnFMc2CWvn+YFDhD3xr2VpopC8VV9B csiSC1riXKdxRUJ2pAdITGNdUMp4KPSi4qBhVNOPw53swFV9itIbBINfHLcUgQ0XHE ouCDS8uDHFRhA== Message-ID: <146d3866ec57e963713cd07b9eaf5a71.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <12d0909b1612fb6d2caa42b4fda5e5ae63d623a3.1724159867.git.andrea.porta@suse.com> <2113b8df52164733a0ee3860bb793d6e.sboyd@kernel.org> Subject: Re: [PATCH 05/11] vmlinux.lds.h: Preserve DTB sections from being discarded after init From: Stephen Boyd Cc: Andrea della Porta , Andrew Lunn , Arnd Bergmann , Bjorn Helgaas , Broadcom internal kernel review list , Catalin Marinas , Claudiu Beznea , Conor Dooley , David S. Miller , Derek Kiernan , Dragan Cvetic , Eric Dumazet , Florian Fainelli , Greg Kroah-Hartman , Jakub Kicinski , Krzysztof Kozlowski , Lee Jones , Linus Walleij , Michael Turquette , Nicolas Ferre , Paolo Abeni , Rob Herring , Saravana Kannan , Stefan Wahren , Will Deacon , devicetree@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kbuild@vger.kernel.org To: Masahiro Yamada Date: Mon, 23 Sep 2024 11:13:47 -0700 User-Agent: alot/0.10 Quoting Masahiro Yamada (2024-09-22 01:14:12) >=20 > Rather, I'd modify my patch as follows: >=20 > --- a/scripts/Makefile.dtbs > +++ b/scripts/Makefile.dtbs > @@ -34,12 +34,14 @@ $(obj)/dtbs-list: $(dtb-y) FORCE > # Assembly file to wrap dtb(o) > # ----------------------------------------------------------------------= ----- >=20 > +builtin-dtb-section =3D $(if $(filter arch/%, $(obj)),.dtb.init.rodata,.= rodata) I think we want to free the empty root dtb that's always builtin. That is in drivers/of/ right? And I worry that an overlay could be in arch/ and then this breaks again. That's why it feels more correct to treat dtbo.o vs. dtb.o differently. Perhaps we can check $(obj) for dtbo vs dtb? Also, modpost code looks for .init* named sections and treats them as initdata already. Can we rename .dtb.init.rodata to .init.dtb.rodata so that modpost can find that?