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=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,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 A2BEEC04FF3 for ; Mon, 24 May 2021 19:56:53 +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 E48A561026 for ; Mon, 24 May 2021 19:56:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E48A561026 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com 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 C69E782EBA; Mon, 24 May 2021 21:56:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="M9ZVf5bF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1346E82EC6; Mon, 24 May 2021 21:56:49 +0200 (CEST) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 96F1882ECC for ; Mon, 24 May 2021 21:56:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x732.google.com with SMTP id v8so28231112qkv.1 for ; Mon, 24 May 2021 12:56:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TbiPgmYv1YfqCHjq+MDz6eRjwtsU9nmM5IzHcTShVfg=; b=M9ZVf5bFvld5n3TiOGR0DtKJ3ScjfJw4Rw2MI2jmMt7DLPUbTmPM6jdiG/RPK/0hJy FL2Y5CeS4GYO948I4jGnyKaqndDjvYPqUDHGt6T3tZdaztFn2ZZ2AAw97Gf2In3A3QZW D6fMTIsxMQO/Q6Xf3TzKMcUKYGLAvEfzwFYec= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TbiPgmYv1YfqCHjq+MDz6eRjwtsU9nmM5IzHcTShVfg=; b=rxibBhkHE6gPL1MVxctbFStTcpCIWYNAUxShXE5T/qymqXUHznR5YEOT9tmHCHNqpf Tli1hpD2ylY6XrtcYvajK6ZvGOSuWFu8FPKUERh51s9kgboLXO64hrN9MEGxJl7QqrK2 S9te3laUkLNnybWuRLHh4VtLKn75G8Nc18NaHWWHdp7V5MrQRebwTW63oDrlkFrDyE1e 5Zsh/wlj4OqmDW6Z4q4Mw4Atl4dJVfsY5kSjwczpOCq20V4aGtMiLNz1Tanzvfu/t7Yw UzJXkJ6cCpIFtST/ODNyBwbsy+EtFsvRcq3gEVObtSuS/kO5pCm5D1yc+bgDB0l967+4 gxKw== X-Gm-Message-State: AOAM533/8xuhaucz5Hd89ADQG62q+QkHuV+sW1vYHwpHq58Eg6OwkFsu n2NNRnDb0SrmzhTwhd3hJmRtCw== X-Google-Smtp-Source: ABdhPJx9VYtqx+1poe4ZstZ6TF+L7Eqc06KTUDuM9p5BduyGw3lANLcoOfjP7cloxrLCC3bnSTOucg== X-Received: by 2002:a05:620a:5bd:: with SMTP id q29mr30522243qkq.226.1621886201331; Mon, 24 May 2021 12:56:41 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-5ce8-9acb-4a3a-47a0.res6.spectrum.com. [2603:6081:7b01:cbda:5ce8:9acb:4a3a:47a0]) by smtp.gmail.com with ESMTPSA id m22sm11797555qkk.65.2021.05.24.12.56.39 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 May 2021 12:56:40 -0700 (PDT) Date: Mon, 24 May 2021 15:56:38 -0400 From: Tom Rini To: Marek Behun Cc: Adam Ford , U-Boot Mailing List , Simon Glass , Heiko Schocher , Patrick Delaunay , Patrice CHOTARD , Miquel Raynal , Pali =?iso-8859-1?Q?Roh=E1r?= , 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: <20210524195638.GF17669@bill-the-cat> References: <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> <20210524211935.6dfba619@thinkpad> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ETxIMHIVhIlEQ6hj" Content-Disposition: inline In-Reply-To: <20210524211935.6dfba619@thinkpad> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) 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 --ETxIMHIVhIlEQ6hj Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 24, 2021 at 09:19:35PM +0200, Marek Behun wrote: > On Mon, 24 May 2021 13:44:38 -0400 > Tom Rini wrote: >=20 > > 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=FAn 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=FAn > > > > > > > > > wrote: =20 > > > > > > > > > > > > > > > > > > > > Enable LTO for some boards that were tested by people o= n U-Boot > > > > > > > > > > Mailing List. > > > > > > > > > > > > > > > > > > > > Signed-off-by: Marek Beh=FAn > > > > > > > > > > Tested-by: Adam Ford > > > > > > > > > > Tested-by: Pali Roh=E1r > > > > > > > > > > Tested-by: Tim Harvey =20 > > > > > > > > >=20 > > > > > > > > > Since the imx8mm beacon boards and the imx8mm venice boar= d both show > > > > > > > > > promise, does it make sense to 'imply' the LTO for anythi= ng enabling > > > > > > > > > imx8mm? > > > > > > > > > Same thing for the various omap3 boards, and potentially = the 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 rema= ining > > > > > > > > > boards have minimal board files and most of code is commo= n to other > > > > > > > > > boards in the same platforms. > > > > > > > > >=20 > > > > > > > > > I have an l138_lcdk that I can use to test which I expect= to be > > > > > > > > > similar to the da850evm. =20 > > > > > > > >=20 > > > > > > > > As much as I am eager to move everything, quickly, over to = LTO by > > > > > > > > default, I think the problems that we've seen thus far show= it's best > > > > > > > > to really make it an explicit enable per board at least for= the first > > > > > > > > release or two. Once we've hopefully gotten more boards te= sted and > > > > > > > > enabled we can see what makes sense for defaults, give a re= lease worth > > > > > > > > of heads up, and then go. =20 > > > > > > >=20 > > > > > > > Tom, are there some other issues aside from the one failing C= I scenario > > > > > > > (sandbox_clang)? Would you be willing to merge this if I reso= lved 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 a= t the > > > > > Linux kernel a bit and I'll post something for us and upstream dt= c 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, b= ut > > > 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 >=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. >=20 > I even started reading sources of gcc on thursday because of this, but > it didn't lead anywhere... >=20 > When you compile sandbox_defconfig with gcc, does the test pass on your > local machine? It passes here with gcc-7.5 as well as gcc-9.2.0 in CI. When I moved to a gcc-11 snapshot in CI, it was also passing there before, so I'm not sure what's going on in your setup. But as part of coming up with the patch I sent to fix the test, I ran it manually and saw the expected failure message. --=20 Tom --ETxIMHIVhIlEQ6hj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmCsBPYACgkQFHw5/5Y0 tyyUOgv5Af8d3baPzAeUOTDlSdxspIS4vXi+WKVutOCYfVgOJiqpny/6Pgqnj3bK OR7mi7mI+g98LDoxjAdJH2a8pvrG3iJt4KqMgJ4s1Zbg5OqQjzZjBuCmp+YQt3RN 0tOmNA99/NI1J9Z+Pef3pznEiaG1fYjQTFayMiZoMaQNt5YnEU+iNxMLCEvBdkLF WD8Fq4kcsgSNSzuoi/G4BtiTqB+BBOZfaUugO/xQ+dKkpnGShWycR4E/oHtm0VLU Iu2Z5kz/XefRkbuoGq9Hs5UedlD6C69WaMUrvPnBF/ImEHXARr+qZh56KRfPn/N2 4VTfeo8WOPPFKsTFqxXAIGtTY94DhmKP0eDaylrRtbhyGw4uDu7wiZWKDVdIDQvt bD/Vw+fcmA2dBF5SIWdcnTHBfuOspB6mfIA7JKuVRYns1IIu3Xfqjt3H+eGFahVt odNeAWI+2lMmwO7Cy5u2WBBI2DK7mta9cThiUVVIyoAJCWIkGIdZ7zvlLQWvLmva 6kLWFxLo =2VIF -----END PGP SIGNATURE----- --ETxIMHIVhIlEQ6hj--