Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4FE11C433F5 for ; Sat, 19 Mar 2022 17:44:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 320DB838F0; Sat, 19 Mar 2022 18:44:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (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="JSpGDXQ1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C13B6830F6; Sat, 19 Mar 2022 18:44:15 +0100 (CET) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (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 9D114838F0 for ; Sat, 19 Mar 2022 18:44:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82b.google.com with SMTP id c4so9172839qtx.1 for ; Sat, 19 Mar 2022 10:44:02 -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; bh=VTx/ZvvTI6MWLRA7LrF8a81Gg68xbH30KGsWEvuzXpc=; b=JSpGDXQ1bsXS1+kiNZunFEoViF2j+bZQ2/AjctIqmH4N6obKmVjjkHTpD39tk0izsk uxdOtvVgGBeox6HuA/j9Q3xlTc1q2Smg4HVVmChEGyxtZ2bQWXnrdnGl7Q2kT13q2QaF A0BZ+9WcK/R0+7Hq8wobHSqIHJ+wmZf/BRqvc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=VTx/ZvvTI6MWLRA7LrF8a81Gg68xbH30KGsWEvuzXpc=; b=kpXuTP419mpBfT7zxfwru+T1oHiCem2mOdNqzaZo6qnVwTM8veaGhdJIWdpaNVzmpH eCGPCatmBvS67Vb9c2qepioF8i8EynUC7dc2PhlPAmJPFmKCBN/xftIrQ/DfJ6M9ZKup 3NcmlkRLqe8R50snWNDhnAxIipBDK8M8ZNDPPR/AtiA+VVvorzEjKcJDmGivUqwm9iab nxxjMdd8LE8N2uP2Uic8gDLEyXRRycioBknYcsphBXq3LI7IUk4lmaNHBCtieJqcE90M CK8hq/1gYPseCC/J0wIopT03wJqHPY/e5wA34HSoOjx9GusQwh+DSzL7t+XnoGmu1hHm h8+g== X-Gm-Message-State: AOAM531bTGvmidu6wH8AebfnT1xZe4hNBjpPmQzXj9LtdcWd0oeMg64w hiwnoxWQ9pXcXD4cg0foe4reOg== X-Google-Smtp-Source: ABdhPJxgG8FsI2UeUNiCqM7ssgGvwphY+XDO7XZ4J+BBt0zkP+hWYuuopQHm4bq9GUkWqp4H20SfLA== X-Received: by 2002:ac8:5bc4:0:b0:2e1:c841:361d with SMTP id b4-20020ac85bc4000000b002e1c841361dmr11416600qtb.208.1647711840999; Sat, 19 Mar 2022 10:44:00 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id d6-20020ac85d86000000b002e1e20444b6sm7995690qtx.57.2022.03.19.10.43.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Mar 2022 10:44:00 -0700 (PDT) Date: Sat, 19 Mar 2022 13:43:57 -0400 From: Tom Rini To: Michael Nazzareno Trimarchi Cc: Fabio Estevam , Gaurav Jain , Stefano Babic , Michael Walle , Varun Sethi , Adrian Alonso , Alison Wang , Andy Tang , Franck Lenormand , Horia Geanta , Ji Luo , "marex@denx.de" , Meenakshi Aggarwal , Mingkai Hu , "olteanv@gmail.com" , Pankaj Gupta , Peng Fan , Pramod Kumar , Priyanka Jain , Rajesh Bhagat , Sahil Malhotra , Shengzhou Liu , Silvano Di Ninno , "sjg@chromium.org" , "u-boot@lists.denx.de" , dl-uboot-imx , Wasim Khan , Ye Li , Raffaele RECALCATI , Jagan Teki Subject: Re: [EXT] Re: [PATCH v8 01/15] crypto/fsl: Add support for CAAM Job ring driver model Message-ID: <20220319174357.GL2226424@bill-the-cat> References: <20220319160522.GG2226424@bill-the-cat> <20220319170351.GI2226424@bill-the-cat> <20220319172501.GJ2226424@bill-the-cat> <20220319173051.GK2226424@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aHoHdjwP6C+YV8GI" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.5 at phobos.denx.de X-Virus-Status: Clean --aHoHdjwP6C+YV8GI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 19, 2022 at 06:37:18PM +0100, Michael Nazzareno Trimarchi wrote: > Hi Tom >=20 > On Sat, Mar 19, 2022 at 6:30 PM Tom Rini wrote: > > > > On Sat, Mar 19, 2022 at 06:27:38PM +0100, Michael Nazzareno Trimarchi w= rote: > > > Hi > > > > > > On Sat, Mar 19, 2022 at 6:25 PM Tom Rini wrote: > > > > > > > > On Sat, Mar 19, 2022 at 06:08:18PM +0100, Michael Nazzareno Trimarc= hi wrote: > > > > > Hi Tom > > > > > > > > > > On Sat, Mar 19, 2022 at 6:03 PM Tom Rini wro= te: > > > > > > > > > > > > On Sat, Mar 19, 2022 at 05:48:59PM +0100, Michael Nazzareno Tri= marchi wrote: > > > > > > > Hi Tom > > > > > > > > > > > > > > On Sat, Mar 19, 2022 at 5:05 PM Tom Rini = wrote: > > > > > > > > > > > > > > > > On Sat, Mar 19, 2022 at 02:51:01PM +0100, Michael Nazzareno= Trimarchi wrote: > > > > > > > > > Hi > > > > > > > > > > > > > > > > > > On Sat, Mar 19, 2022 at 2:25 PM Fabio Estevam wrote: > > > > > > > > > > > > > > > > > > > > Hi Michael, > > > > > > > > > > > > > > > > > > > > On Sat, Mar 19, 2022 at 6:47 AM Michael Nazzareno Trima= rchi > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > HI > > > > > > > > > > > > > > > > > > > > > > Please send me a link to apply your series > > > > > > > > > > > > > > > > > > > > You can get the series from patchwork (just click in th= e 'series' button) > > > > > > > > > > https://patchwork.ozlabs.org/project/uboot/patch/202201= 12133127.16880-2-gaurav.jain@nxp.com/ > > > > > > > > > > > > > > > > > > Done, well, I have tried remove DM_GPIO in SPL. Seems tha= t I need to > > > > > > > > > remove a lot of features. I have tested LTO build but size > > > > > > > > > of SPL increase. Is that strange? > > > > > > > > > > > > > > > > That is very strange. Can you post your patches somewhere? > > > > > > > > > > > > > > > > -- > > > > > > > > Tom > > > > > > > > > > > > > > Start from here 9776c4e9d00ac49d6388ffe9e084ff03b37ae479 > > > > > > > export ARCH=3Darm > > > > > > > export CROSS_COMPILE=3Darm-linux-gnueabihf- > > > > > > > > > > > > > > make imx6dl_mamoj_defconfig > > > > > > > build it > > > > > > > > > > > > > > Try then to enable LTO and build it again > > > > > > > > > > > > > > spl/u-boot-spl.bin exceeds file size limit: > > > > > > > limit: 0xefa0 bytes > > > > > > > actual: 0xf071 bytes > > > > > > > excess: 0xd1 bytes > > > > > > > > > > > > > > So LTO does not help even on beginning on this board. You don= 't need > > > > > > > to apply any patch for this test > > > > > > > > > > > > I think that's some artifact of mixing LTO/non-LTO and the worl= d not > > > > > > getting rebuilt? Just enabling LTO after the defconfig works f= ine and > > > > > > is smaller than before. > > > > > > > > > > In order to save space I did not change what we have. Every build= starts from > > > > > a mrproper and new configuration. I can not mix LTO/non-LTO in th= is case. I'm > > > > > using upstream defconfig and upstream defconfig + LTO enabled and= the result is > > > > > that spl increase in size for LTO building. I'm working to keep o= ut > > > > > part that are not really needed but > > > > > I was hoping that LTO give me some help here > > > > > > > > Yes, LTO saves about 5KiB on the SPL binary. You just need to enab= le it > > > > in the config before you start building, not after you've built > > > > everything once. > > > > > > Offcourse ;) but this not the case. I don't drink enough to think that > > > change a config, decrease the build size ;) > > > > LTO is an entirely different way of the compiler / linker optimizing the > > binary. So yes, in this case enabling a single option decreases the > > size. >=20 >=20 > I think we are in a circle. Let's have the result with LTO >=20 > spl/keep-syms-lto.c > ( cd spl && arm-linux-gnueabihf-gcc -nostdlib -nostartfiles > -fuse-linker-plugin -flto=3D8 -Wall -Wstrict-prototypes > -Wno-format-security -fno-builtin -ffreestanding -std=3Dgnu11 > -fshort-wchar -fno-strict-aliasing -fno-PIE -Os -flto=3D8 > -fno-stack-protector -fno-delete-null-pointer-checks -Wno-pointer-sign > -Wno-stringop-truncation -Wno-array-bounds -Wno-stringop-overflow > -Wno-maybe-uninitialized -fmacro-prefix-map=3D./=3D -g -fstack-usage > -Wno-format-nonliteral -Wno-address-of-packed-member > -Wno-unused-but-set-variable -Werror=3Ddate-time -Wno-packed-not-aligned > -ffunction-sections -fdata-sections -fno-stack-protector -D__KERNEL__ > -D__UBOOT__ -DCONFIG_SPL_BUILD -D__ARM__ -Wa,-mimplicit-it=3Dalways > -mthumb -mthumb-interwork -mabi=3Daapcs-linux -mno-unaligned-access > -fno-common -ffixed-r9 -msoft-float -mgeneral-regs-only -pipe > -march=3Darmv7-a -D__LINUX_ARM_ARCH__=3D7 -mtune=3Dgeneric-armv7-a > -Ispl/include -Iinclude -I./arch/arm/include -include > ./include/linux/kconfig.h -nostdinc -isystem > /usr/lib/gcc-cross/arm-linux-gnueabihf/9/include -Wl,-T > -Wl,u-boot-spl.lds -Wl,-Bstatic -Wl,--gc-sections > -Wl,--no-dynamic-linker -Wl,--build-id=3Dnone -Wl,-Ttext -Wl,0x00908000 > arch/arm/cpu/armv7/start.o -Wl,--whole-archive > arch/arm/cpu/armv7/built-in.o arch/arm/cpu/built-in.o > arch/arm/lib/built-in.o arch/arm/mach-imx/built-in.o > board/bticino/mamoj/built-in.o common/spl/built-in.o > common/init/built-in.o boot/built-in.o common/built-in.o > cmd/built-in.o env/built-in.o lib/built-in.o disk/built-in.o > drivers/built-in.o drivers/usb/dwc3/built-in.o > drivers/usb/cdns3/built-in.o dts/built-in.o fs/built-in.o > keep-syms-lto.o arch/arm/lib/eabi_compat.o arch/arm/lib/lib.a > -Wl,--no-whole-archive -Wl,-Map,u-boot-spl.map -o u-boot-spl ) > arm-linux-gnueabihf-objcopy -j .text -j .secure_text -j > .secure_data -j .rodata -j .hash -j .data -j .got -j .got.plt -j > .u_boot_list -j .rel.dyn -j .binman_sym_table -j .text_rest -j > .dtb.init.rodata -j .efi_runtime -j .efi_runtime_rel -O binary > spl/u-boot-spl spl/u-boot-spl-nodtb.bin > arm-linux-gnueabihf-objdump -t spl/u-boot-spl > spl/u-boot-spl.sym > cat spl/u-boot-spl-nodtb.bin spl/u-boot-spl.dtb > spl/u-boot-spl-dtb.bin > cp spl/u-boot-spl-dtb.bin spl/u-boot-spl.bin > spl/u-boot-spl.bin exceeds file size limit: > limit: 0xefa0 bytes > actual: 0xf079 bytes > excess: 0xd9 bytes > make: *** [Makefile:2082: spl/u-boot-spl.bin] Error 1 > make: *** Deleting file 'spl/u-boot-spl.bin' >=20 > and without >=20 > NUX_ARM_ARCH__=3D7 -mtune=3Dgeneric-armv7-a -D__ASSEMBLY__ -x c -o > spl/u-boot-spl.cfgout arch/arm/mach-imx/spl_sd.cfg > ./tools/mkimage -n spl/u-boot-spl.cfgout -T imximage -e 0x00908000 > -d spl/u-boot-spl.bin SPL >SPL.log && cat SPL.log > Image Type: Freescale IMX Boot Image > Image Ver: 2 (i.MX53/6/7 compatible) > Mode: DCD > Data Size: 73824 Bytes =3D 72.09 KiB =3D 0.07 MiB > Load Address: 00907420 > Entry Point: 00908000 > HAB Blocks: 0x00907400 0x00000000 0x0000fc00 > DCD Blocks: 0x00910000 0x0000002c 0x00000004 > make -f ./scripts/Makefile.build obj=3Darch/arm/mach-imx u-boot-with-spl.= imx > mkdir -p spl/ > ./tools/mkimage -n spl/u-boot-spl.cfgout -T imximage -e 0x00908000 > -d spl/u-boot-spl.bin SPL >SPL.log && cat SPL.log > Image Type: Freescale IMX Boot Image > Image Ver: 2 (i.MX53/6/7 compatible) > Mode: DCD > Data Size: 73824 Bytes =3D 72.09 KiB =3D 0.07 MiB > Load Address: 00907420 > Entry Point: 00908000 > HAB Blocks: 0x00907400 0x00000000 0x0000fc00 > DCD Blocks: 0x00910000 0x0000002c 0x00000004 > arm-linux-gnueabihf-objcopy -j .text -j .secure_text -j > .secure_data -j .rodata -j .hash -j .data -j .got -j .got.plt -j > .u_boot_list -j .rel.dyn -j .binman_sym_table -j .text_rest -j > .dtb.init.rodata -j .efi_runtime -j .efi_runtime_rel -I binary -O > binary --pad-to=3D0x11000 SPL u-boot-with-spl.imx && cat u-boot.img >> > u-boot-with-spl.imx || rm -f u-boot-with-spl.imx >=20 >=20 > What I'm trying to say is that I have followed the correct steps and > this is the LTO change >=20 > git diff > diff --git a/configs/imx6dl_mamoj_defconfig b/configs/imx6dl_mamoj_defcon= fig > index ae27857e6f..4a535012b2 100644 > --- a/configs/imx6dl_mamoj_defconfig > +++ b/configs/imx6dl_mamoj_defconfig > @@ -14,6 +14,7 @@ CONFIG_SPL_TEXT_BASE=3D0x00908000 > CONFIG_SPL_DRIVERS_MISC=3Dy > CONFIG_IMX_HAB=3Dy > # CONFIG_CMD_BMODE is not set > +CONFIG_LTO=3Dy > CONFIG_DISTRO_DEFAULTS=3Dy > CONFIG_BOOTDELAY=3D3 > CONFIG_SPL_OS_BOOT=3Dy Here's what I see: $ git describe HEAD v2022.04-rc4-50-g9776c4e9d00a $ make imx6dl_mamoj_defconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o YACC scripts/kconfig/zconf.tab.c LEX scripts/kconfig/zconf.lex.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf # # configuration written to .config # $ sed -i -e 's/# CONFIG_LTO is not set/CONFIG_LTO=3Dy/' .config $ grep LTO .config CONFIG_ARCH_SUPPORTS_LTO=3Dy CONFIG_LTO=3Dy $ make CROSS_COMPILE=3D~/.buildman-toolchains/gcc-11.1.0-nolibc/arm-linux-g= nueabi/bin/arm-linux-gnueabi- -sj12 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D WARNING =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This board does not use CONFIG_DM_SERIAL (Driver Model for Serial drivers). Please update the board to use CONFIG_DM_SERIAL before the v2023.04 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D arch/arm/dts/imx6dl-dhcom-pdk2.dtb: Warning (pwms_property): /display-bl:pw= ms: cell 3 is not a phandle reference arch/arm/dts/imx6dl-dhcom-pdk2.dtb: Warning (pwms_property): /display-bl: M= issing property '#pwm-cells' in node /soc/bus@2000000/gpc@20dc000 or bad ph= andle (referred from pwms[3]) arch/arm/dts/imx6q-dhcom-pdk2.dtb: Warning (pwms_property): /display-bl:pwm= s: cell 3 is not a phandle reference arch/arm/dts/imx6q-dhcom-pdk2.dtb: Warning (pwms_property): /display-bl: Mi= ssing property '#pwm-cells' in node /soc/bus@2000000/gpc@20dc000 or bad pha= ndle (referred from pwms[3]) $ ls -lh spl/u-boot-spl* -rwxrwxr-x 1 trini trini 944K Mar 19 13:40 spl/u-boot-spl -rw-rw-r-- 1 trini trini 54K Mar 19 13:40 spl/u-boot-spl.bin -rw-rw-r-- 1 trini trini 1.6K Mar 19 13:40 spl/u-boot-spl.cfgout -rw-rw-r-- 1 trini trini 2.2K Mar 19 13:40 spl/u-boot-spl.dtb -rw-rw-r-- 1 trini trini 54K Mar 19 13:40 spl/u-boot-spl-dtb.bin -rw-rw-r-- 1 trini trini 728 Mar 19 13:40 spl/u-boot-spl.lds -rw-rw-r-- 1 trini trini 5.9K Mar 19 13:40 spl/u-boot-spl.ltrans0.ltrans.su -rw-rw-r-- 1 trini trini 7.2K Mar 19 13:40 spl/u-boot-spl.ltrans1.ltrans.su -rw-rw-r-- 1 trini trini 182K Mar 19 13:40 spl/u-boot-spl.map -rwxrwxr-x 1 trini trini 51K Mar 19 13:40 spl/u-boot-spl-nodtb.bin -rw-rw-r-- 1 trini trini 135K Mar 19 13:40 spl/u-boot-spl.sym --=20 Tom --aHoHdjwP6C+YV8GI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmI2FlkACgkQFHw5/5Y0 tyyfDgwApNX9PMCTGHFiXEuNyxNS89SDDrDdIb40pbvReHe91LDatVBL+a3WaC9M VKFBXR5Q6yIoay0Wpd9G3+FEHBQuZoDuILBfGuTZ1odt4iPiQfJRWwipDR4J9MkJ ImA0IhJNkN0npm+2w7LFf06jWyZSV6kVOjiP2aG7WaXYW+NfPKkpWUjP33qyZJT6 CTi79Ij0qeKsP+T5w9XgKPWwIRSxqIVzlg0+L7nZbQIpcjo228viAaxgdluLMkJv RBHFcL9fISYkzkFpAMQD3vdKUscqum3K2h73Mz3lKC4IyYXQTbdPU3ipFJ5vV8Y7 zDJXjF89mdN4HRcXl76Mb00xLJRnAuwOazfyehNSkLSdF5rKGMVt0DbPTRR0J73o sMH56jjlyttgazZUa8gwopssHQB/JJ7kdtvqzXON4Uv/qo5FtHaPShLGfRvOTyx2 Nc86Ek8Ezy/XvZRStlaDzheU8rxbil9S00tbD5v8OECsN4AOSv0CZJvN049k/WBL 6bmyVNqr =4qlL -----END PGP SIGNATURE----- --aHoHdjwP6C+YV8GI--