From: Eugen Hristev <eugen.hristev@collabora.com>
To: Stefan Roese <sr@denx.de>, u-boot@lists.denx.de
Cc: "Eugen Hristev" <eugen.hristev@microchip.com>,
"Pali Rohár" <pali@kernel.org>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
cristian.birsan@microchip.com
Subject: Re: [PATCH] configs: at91: sama5d2_icp_mmc: Enable CONFIG_LTO
Date: Thu, 27 Apr 2023 12:19:49 +0300 [thread overview]
Message-ID: <cf1f69b3-c682-118c-08fc-e7bf27d22a5e@collabora.com> (raw)
In-Reply-To: <20230427085945.475619-1-sr@denx.de>
Hi Stefan,
Thank you for the patch.
This I guess is a workaround such that you can add a bit more of code.
In the end, it's not scalable, and we have to find a better way,
probably by removing some of the code to make the SPL smaller.
How does this impact the size? How much we are gaining ?
We can perhaps have a look to see which code is removed and guard it by
#ifndef SPL_BUILD and that might lower the size. (if ofcourse, this code
should really be removed)
Also, I don't have a board at hand to test this, so it has to be tested
first to make sure the board doesn't break.
Eugen
On 4/27/23 11:59, Stefan Roese wrote:
> Adding just a tiny bit more code for sama5d2_icp_mmc leads to a SRAM
> image overflow. Fix this by enabling LTO for this board, so that such
> changes still can be made to the common U-Boot code.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Tudor Ambarus <tudor.ambarus@microchip.com>
> Cc: Eugen Hristev <eugen.hristev@microchip.com>
> Cc: Sergiu Moga <sergiu.moga@microchip.com>
> Cc: Pali Rohár <pali@kernel.org>
> ---
> configs/sama5d2_icp_mmc_defconfig | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/configs/sama5d2_icp_mmc_defconfig b/configs/sama5d2_icp_mmc_defconfig
> index e1b602d8e5ec..a3c57a3f1250 100644
> --- a/configs/sama5d2_icp_mmc_defconfig
> +++ b/configs/sama5d2_icp_mmc_defconfig
> @@ -9,9 +9,11 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
> CONFIG_SPL_LIBGENERIC_SUPPORT=y
> CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20003ef0
> +CONFIG_SF_DEFAULT_SPEED=66000000
> CONFIG_ENV_SIZE=0x4000
> CONFIG_DM_GPIO=y
> CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_icp"
> +CONFIG_OF_LIBFDT_OVERLAY=y
> CONFIG_SPL_MMC=y
> CONFIG_SPL_SERIAL=y
> CONFIG_SPL_DRIVERS_MISC=y
> @@ -24,6 +26,7 @@ CONFIG_SPL_FS_FAT=y
> CONFIG_SPL_LIBDISK_SUPPORT=y
> CONFIG_SYS_LOAD_ADDR=0x22000000
> CONFIG_DEBUG_UART=y
> +CONFIG_LTO=y
> CONFIG_ENV_VARS_UBOOT_CONFIG=y
> CONFIG_SYS_MONITOR_LEN=524288
> CONFIG_FIT=y
> @@ -86,7 +89,6 @@ CONFIG_MMC_SDHCI=y
> CONFIG_MMC_SDHCI_ATMEL=y
> CONFIG_DM_SPI_FLASH=y
> CONFIG_SF_DEFAULT_BUS=2
> -CONFIG_SF_DEFAULT_SPEED=66000000
> CONFIG_SPI_FLASH_SFDP_SUPPORT=y
> CONFIG_SPI_FLASH_ATMEL=y
> CONFIG_SPI_FLASH_MACRONIX=y
> @@ -110,5 +112,4 @@ CONFIG_TIMER=y
> CONFIG_SPL_TIMER=y
> CONFIG_ATMEL_TCB_TIMER=y
> CONFIG_SPL_ATMEL_TCB_TIMER=y
> -CONFIG_OF_LIBFDT_OVERLAY=y
> # CONFIG_EFI_LOADER_HII is not set
next prev parent reply other threads:[~2023-04-27 9:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 8:59 [PATCH] configs: at91: sama5d2_icp_mmc: Enable CONFIG_LTO Stefan Roese
2023-04-27 9:19 ` Eugen Hristev [this message]
2023-04-27 9:26 ` Stefan Roese
2023-04-27 9:51 ` Eugen Hristev
2023-04-27 10:30 ` Stefan Roese
2023-04-27 16:55 ` Pali Rohár
2023-05-03 9:51 ` Eugen Hristev
2023-05-04 6:09 ` Nicolas.Ferre
2023-04-27 14:38 ` Tom Rini
2023-07-24 11:08 ` Eugen Hristev
2023-07-24 11:15 ` Mihai.Sain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf1f69b3-c682-118c-08fc-e7bf27d22a5e@collabora.com \
--to=eugen.hristev@collabora.com \
--cc=cristian.birsan@microchip.com \
--cc=eugen.hristev@microchip.com \
--cc=nicolas.ferre@microchip.com \
--cc=pali@kernel.org \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox