[PATCH v3 16/38] spl: Remove #ifdefs with BOOTSTAGE
Tom Rini
trini at konsulko.com
Mon Sep 25 21:56:06 CEST 2023
On Sun, Sep 24, 2023 at 01:25:01PM -0600, Simon Glass wrote:
> This feature has some helpers in its header file so that its functions
> resolve to nothing when the feature is disabled. Add a few more and use
> these to simplify the code.
>
> With this there are no more #ifdefs in board_init_r()
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v1)
>
> common/spl/spl.c | 15 +++------------
> include/bootstage.h | 26 ++++++++++++++++++++++++++
> 2 files changed, 29 insertions(+), 12 deletions(-)
This isn't equivalent:
aarch64: (for 1/1 boards) spl/u-boot-spl:all +722.0 spl/u-boot-spl:rodata +14.0 spl/u-boot-spl:text +708.0
lion-rk3368 : spl/u-boot-spl:all +722 spl/u-boot-spl:rodata +14 spl/u-boot-spl:text +708
spl-u-boot-spl: add: 3/0, grow: 2/0 bytes: 708/0 (708)
function old new delta
bootstage_unstash - 308 +308
bootstage_stash - 284 +284
static.get_record_name - 92 +92
spl_common_init 124 136 +12
board_init_r 424 436 +12
Perhaps because this (and another platform) are ones that set:
$ grep BOOTSTAGE .config
CONFIG_BOOTSTAGE_STASH_ADDR=0x0
CONFIG_BOOTSTAGE=y
CONFIG_SPL_BOOTSTAGE=y
# CONFIG_TPL_BOOTSTAGE is not set
CONFIG_BOOTSTAGE_REPORT=y
CONFIG_BOOTSTAGE_RECORD_COUNT=30
CONFIG_SPL_BOOTSTAGE_RECORD_COUNT=5
CONFIG_BOOTSTAGE_FDT=y
# CONFIG_BOOTSTAGE_STASH is not set
CONFIG_BOOTSTAGE_STASH_SIZE=0x1000
CONFIG_CMD_BOOTSTAGE=y
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230925/70ca98f4/attachment.sig>
More information about the U-Boot
mailing list