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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 BCCE8C4708F for ; Tue, 1 Jun 2021 17:23:54 +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 8DD9C613AE for ; Tue, 1 Jun 2021 17:23:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DD9C613AE 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 7E6C482EB9; Tue, 1 Jun 2021 19:23:51 +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="NtxXgbD/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D13DC82CB2; Tue, 1 Jun 2021 19:23:49 +0200 (CEST) Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (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 09BE080C98 for ; Tue, 1 Jun 2021 19:23:47 +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-qv1-xf35.google.com with SMTP id k2so7605922qvc.5 for ; Tue, 01 Jun 2021 10:23:46 -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=5lqnDwJL8S3Sbek1w6/IVzP5ruvMQdcbS9JF5LpS3Kk=; b=NtxXgbD/bD5sWAQkoUITU+5J9h7/T7n6AUcSdwMVjqxtRyQN07Y8BMChNk09UmTt9i ULcpcV8DKRxp2/bNUG6QntFYjAU1tJBw2gJuzkxyYHNMHTnyTqLkb5v2KcJMbaDo0zwD hqbSAEzOGPP+GNp+HlkRp9dErp5cdY6mlNC28= 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=5lqnDwJL8S3Sbek1w6/IVzP5ruvMQdcbS9JF5LpS3Kk=; b=htnq5WGYO+nLvXP9nQlURid195jNQGnCUxYtDJwTvWCkc9LqmH7/5ag+vr5tcBb7b0 5VlYWxCoO8t45KdaMZID+PQazo8xSy14C8oJX5xyDXRuJZsGX+Y8nD73VCOjs//JGWDC ro1oI8XTXiy8jvuFuUjCv72zBh2FzM+0eD3AW5iZQDnc4CxPNXOFyGRp1cXP0+r11SpZ QPsbUjY4Yey/SzpxFCmsD7jc8aOwCTTUdGrk+WK5wgDyVamUm42f3Kh4TyrrKBYbJjAW UWkiYVIc700F0OKNrjXBHEmjmGe7waHpuRQKzYrd8ccHVnXgqQcR6w6v9y/dfgpmaNB2 Xffg== X-Gm-Message-State: AOAM533AAa7oWglJxCR0wRa7sNBH6jq5nN3JR6WVUeWKApVTDPUReHNI 2ddvsjicS/typ9NJpmbkpl7Udg== X-Google-Smtp-Source: ABdhPJyTeFUdLHWOThjTrZnspLma18YZ8qOb99RYDkBlPec3W3/5AqDKOPIFfxwvfP/msjvuk9+LPw== X-Received: by 2002:a05:6214:18d:: with SMTP id q13mr23743220qvr.60.1622568225710; Tue, 01 Jun 2021 10:23:45 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-98df-de31-e21d-e1a1.res6.spectrum.com. [2603:6081:7b01:cbda:98df:de31:e21d:e1a1]) by smtp.gmail.com with ESMTPSA id h10sm11913993qka.26.2021.06.01.10.23.44 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Jun 2021 10:23:44 -0700 (PDT) Date: Tue, 1 Jun 2021 13:23:42 -0400 From: Tom Rini To: Heinrich Schuchardt Cc: Marek =?iso-8859-1?Q?Beh=FAn?= , Patrick DELAUNAY , u-boot@lists.denx.de, Simon Glass , Heiko Schocher , Patrick Delaunay , Patrice CHOTARD , Miquel Raynal , Pali =?iso-8859-1?Q?Roh=E1r?= , Stefan Roese , Alexander Graf , Marek Vasut , Neil Armstrong , Ryder Lee , Adam Ford , Bin Meng , Harald Seiler , Tim Harvey Subject: Re: [PATCH u-boot v4 00/36] U-Boot LTO (Sandbox + Some ARM boards) Message-ID: <20210601172342.GI14385@bill-the-cat> References: <20210520112425.25166-1-marek.behun@nic.cz> <20210601182230.113e8107@dellmb> <35625d48-da6d-5f21-55fa-bd3972e38d3f@gmx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5oH/S/bF6lOfqCQb" Content-Disposition: inline In-Reply-To: <35625d48-da6d-5f21-55fa-bd3972e38d3f@gmx.de> 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 --5oH/S/bF6lOfqCQb Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 01, 2021 at 06:55:52PM +0200, Heinrich Schuchardt wrote: > On 6/1/21 6:22 PM, Marek Beh=FAn wrote: > > On Tue, 1 Jun 2021 16:59:52 +0200 > > Patrick DELAUNAY wrote: > >=20 > > > Hi Marek, > > >=20 > > > I am trying to activate CONFIG_LTO for STMicroelectronics stm32mp15 > > > platform > > >=20 > > > (stm32mp15_trusted_defconfig and stm32mp15_basic_defconfig). > > >=20 > > >=20 > > > The config stm32mp15_basic_defconfig, with SPL supported failed to > > > boot > > >=20 > > > with gcc-arm-9.2-2019.12. > > >=20 > > > because a weak function is not correctly handle between > > >=20 > > > 1/ ./arch/arm/lib/cache-cp15.c: 96 > > >=20 > > > =A0=A0=A0 __weak void dram_bank_mmu_setup(int bank); > > >=20 > > > 2/ the stm32mp implementation in > > >=20 > > > =A0=A0 arch/arm/mach-stm32mp/cpu.c:62 > > >=20 > > > =A0=A0 void dram_bank_mmu_setup(int bank) > > >=20 > > > =3D> The used function in SPL is the cache library, not the stm32mp > > > function. > > >=20 > > > =A0=A0=A0=A0=A0 and SPL boot it OK when I remove the function in th= e cache > > > library... > > >=20 > > >=20 > > > And the issue is also solved with I use a more recent version > > >=20 > > > gcc-arm-10.2-2020.11 on my PC. > > >=20 > > >=20 > > > Do you see the same kind of issue for old version of gcc ? > > >=20 > > >=20 > > > Do you think CONFIG_LTO require a more recent version of gcc that > > >=20 > > > the minimal version required by U-Boot=A0 because I don't see this > > > information > > >=20 > > > in the serie? > >=20 > > I only tried compiling with older versions in the CI. > >=20 > > On the devices for which I tested it I only compiled with newer gcc > > (10.2.0) since it is the stable version on my system. > >=20 > > But yeah, I suggest to use newer GCC for LTO. > >=20 > > Marek > >=20 >=20 > gcc (Debian 11-20210327-1) 11.0.1 compiles stm32mp15_basic_defconfig > with CONFIG_LTO=3Dy. It's run-time not compile time that shows the problem however as gcc-9.x sounds like it has a problem with LTO and weak functions. --=20 Tom --5oH/S/bF6lOfqCQb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmC2bRsACgkQFHw5/5Y0 tyxDQAv/SCGpLfVPa2ptb9M4i2l2tLo5rrYtCZlbeHH46S/xvRhHoMw0wJkE6Pzf tMdDH1ukL8hkkfzFYjt3hV9DvPC4b90jV7wiL7PcCdk0GpE+t+3OtGGDraVThvsB itDXPfzYse6e81U/qpD+TJeQS/xKyQIuQ1Yd1RSyjXuDLg/EMJ7rriXvBf1p4kAq 9VmI/jSeR7ln1T97eKe0zr7s2VUfnJDm7ghYoF3ShOmDusmZl1js/rv67XpFT4ju ZvmYj4vSk1qyX7JsoNJ+S/z7LOB1a1xzFzE+tx4Z0toarbdoI4keyd+JkTdOQcCm Cwgumy9g2ApQPjiHMMbsgA8546ifevpHjMJmspiptHDAqzfKCysNdionKvL/9mXg XgFFy/4qhiCeYnCMOqhiDk1b9WVPMBSpJm0n5VVRs2DWNG8AEzN9jXtlNB214qUU 1mayIR4jDhQYaWQhASRUul7Phoo4FSLz8CqDWzE/ID5+F6gisq+GP8xy+l65v+Cz 5jTdL/fM =3YSA -----END PGP SIGNATURE----- --5oH/S/bF6lOfqCQb--