From: Tom Rini Date: Thu, 31 Aug 2023 19:10:42 +0000 (-0400) Subject: Merge branch '2023-08-31-replace-more-init-hooks-with-events' into next X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=b8b512a45358d50bce2e17b5941c5e39b52a0594;p=u-boot.git Merge branch '2023-08-31-replace-more-init-hooks-with-events' into next To quote the author: This series replaces some more of the init hooks in board_f.c and board_r.c with events. Notably it converts last_state_init() over. It also provides a 'simple' event spy, which takes no arguments. It turns out that this is quite a common case, so it is worth optimising for this, to reduce code size, before events become too commonly used. Finally, it introduces a way of emitting an event in an initcall, instead of calling a function. This is likely to be used at least as often as the functions, as we convert more of these initcalls. As part of this, the initcall code is brought back into a C file. Somehow the compiler has changed or something else, so that this does not confer any benefits now. For boards with EVENT enabled, this unfortunately results in small growth, e.g. for firefly: aarch64: (for 1/1 boards) all +114.0 data +16.0 rodata +22.0 text +76.0 arm: (for 1/1 boards) all +82.0 rodata +18.0 text +64.0 For boards without EVENT enabled the growth is smaller, e.g. nokia_rx51: arm: (for 1/1 boards) all +32.0 data +8.0 rodata -8.0 text +32.0 I cannot find a good way to avoid the latter, other than macro magic with an embedded comma (to completely remove an event entry), which seems nasty. --- b8b512a45358d50bce2e17b5941c5e39b52a0594