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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 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 24B77C2B9F8 for ; Mon, 24 May 2021 19:19:45 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1FBF0610FA for ; Mon, 24 May 2021 19:19:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FBF0610FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nic.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CDC8A82EA8; Mon, 24 May 2021 21:19:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id A80FD82EAD; Mon, 24 May 2021 21:19:40 +0200 (CEST) Received: from mail.nic.cz (lists.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9555282EA6 for ; Mon, 24 May 2021 21:19:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from thinkpad (unknown [IPv6:2a0e:b107:ae1:0:3e97:eff:fe61:c680]) by mail.nic.cz (Postfix) with ESMTPSA id 6F1B1140767; Mon, 24 May 2021 21:19:36 +0200 (CEST) Date: Mon, 24 May 2021 21:19:35 +0200 From: Marek Behun To: Tom Rini Cc: Adam Ford , U-Boot Mailing List , Simon Glass , Heiko Schocher , Patrick Delaunay , Patrice CHOTARD , Miquel Raynal , Pali =?UTF-8?B?Um9ow6Fy?= , Stefan Roese , Heinrich Schuchardt , Alexander Graf , Marek Vasut , Neil Armstrong , Ryder Lee , Bin Meng , Harald Seiler , Tim Harvey Subject: Re: [PATCH u-boot v4 36/36] ARM: enable LTO for some boards Message-ID: <20210524211935.6dfba619@thinkpad> In-Reply-To: <20210524174438.GD17669@bill-the-cat> References: <20210520112425.25166-1-marek.behun@nic.cz> <20210520112425.25166-37-marek.behun@nic.cz> <20210521141147.GG17669@bill-the-cat> <20210521180031.08b842e0@dellmb> <20210521165641.GK17669@bill-the-cat> <20210524154053.GA17669@bill-the-cat> <20210524175855.2090a751@thinkpad> <20210524170919.GC17669@bill-the-cat> <20210524174438.GD17669@bill-the-cat> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean On Mon, 24 May 2021 13:44:38 -0400 Tom Rini wrote: > On Mon, May 24, 2021 at 01:09:19PM -0400, Tom Rini wrote: > > On Mon, May 24, 2021 at 05:58:55PM +0200, Marek Behun wrote: =20 > > > On Mon, 24 May 2021 11:40:53 -0400 > > > Tom Rini wrote: > > > =20 > > > > On Fri, May 21, 2021 at 12:56:41PM -0400, Tom Rini wrote: =20 > > > > > On Fri, May 21, 2021 at 06:00:31PM +0200, Marek Beh=C3=BAn wrote:= =20 > > > > > > On Fri, 21 May 2021 10:11:47 -0400 > > > > > > Tom Rini wrote: > > > > > > =20 > > > > > > > On Thu, May 20, 2021 at 01:56:29PM -0500, Adam Ford wrote: = =20 > > > > > > > > On Thu, May 20, 2021 at 6:25 AM Marek Beh=C3=BAn > > > > > > > > wrote: =20 > > > > > > > > > > > > > > > > > > Enable LTO for some boards that were tested by people on = U-Boot > > > > > > > > > Mailing List. > > > > > > > > > > > > > > > > > > Signed-off-by: Marek Beh=C3=BAn > > > > > > > > > Tested-by: Adam Ford > > > > > > > > > Tested-by: Pali Roh=C3=A1r > > > > > > > > > Tested-by: Tim Harvey =20 > > > > > > > >=20 > > > > > > > > Since the imx8mm beacon boards and the imx8mm venice board = both show > > > > > > > > promise, does it make sense to 'imply' the LTO for anything= enabling > > > > > > > > imx8mm? > > > > > > > > Same thing for the various omap3 boards, and potentially th= e renesas > > > > > > > > RZ/G2 boards. I know Tom went through to remove a bunch of= boards > > > > > > > > that were never converted to DM. Most of the boards remain= ing > > > > > > > > boards have minimal board files and most of code is common = to other > > > > > > > > boards in the same platforms. > > > > > > > >=20 > > > > > > > > I have an l138_lcdk that I can use to test which I expect t= o be > > > > > > > > similar to the da850evm. =20 > > > > > > >=20 > > > > > > > As much as I am eager to move everything, quickly, over to LT= O by > > > > > > > default, I think the problems that we've seen thus far show i= t's best > > > > > > > to really make it an explicit enable per board at least for t= he first > > > > > > > release or two. Once we've hopefully gotten more boards test= ed and > > > > > > > enabled we can see what makes sense for defaults, give a rele= ase worth > > > > > > > of heads up, and then go. =20 > > > > > >=20 > > > > > > Tom, are there some other issues aside from the one failing CI = scenario > > > > > > (sandbox_clang)? Would you be willing to merge this if I resolv= ed that > > > > > > one fail by disabling LTO for that scenario (until I resolve it= )? It > > > > > > would help me not having to maintain all 30+ patches... =20 > > > > >=20 > > > > > Yeah, CI needs to keep passing, so if we need to disable > > > > > sandbox+clang+lto for now, OK. =20 > > > >=20 > > > > Ah, I see the problem now. I've worked out a fix after looking at = the > > > > Linux kernel a bit and I'll post something for us and upstream dtc = as > > > > well. > > > > =20 > > >=20 > > > What do you mean? The problem is in dtc? I see 2 problems: > > > - one with DM test > > > - one with stack protector test =20 > >=20 > > I don't have a full answer about the stack protector test just yet, but > > it almost seems like it's too simple and maybe something is happening > > with it being optimized to not a problem? =20 >=20 > Yeah, so clang with LTO optimizes away that memset call, and so the test > passes. I'll do something to make sure the array is used so it won't be > optimized away. >=20 I am unable to make the compiler to protect the stack of that function even with GCC on my local machine. It seems that at least on my gentoo with gcc-10.2, when compiling with -ffreestanding, the call to __stack_chk_fail is not made at all. I even started reading sources of gcc on thursday because of this, but it didn't lead anywhere... When you compile sandbox_defconfig with gcc, does the test pass on your local machine? Marek