From: Jerome Forissier <jerome.forissier@linaro.org>
To: u-boot@lists.denx.de
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
Michal Simek <michal.simek@amd.com>,
Jerome Forissier <jerome.forissier@linaro.org>
Subject: [PATCH v4 0/2] Static initcalls
Date: Mon, 6 Jan 2025 15:40:12 +0100 [thread overview]
Message-ID: <cover.1736174204.git.jerome.forissier@linaro.org> (raw)
This series replaces the dynamic initcalls (with function pointers) with
static calls, and gets rid of initcall_run_list(), init_sequence_f,
init_sequence_f_r and init_sequence_r. This makes the code simpler and the
binary slighlty smaller: -2281 bytes/-0.21 % with LTO enabled and -510
bytes/-0.05 % with LTO disabled (xilinx_zynqmp_kria_defconfig).
Execution time doesn't seem to change noticeably. There is no impact on
the SPL.
Changes in v4:
- Fold all changes to board_init_*() into a single patch
- Use '#if CONFIG_IS_ENABLED(FOO) INITCALL(init_foo) #endif' instead of
'CONFIG_IS_ENABLED(FOO, (INITCALL(init_foo);));' (Caleb C., Simon G.).
As a consequence, drop Michal's patch ("common: board: Simplify array
with function pointers with CONFIG_IS_ENABLED").
- Rebase on next
Changes in v3:
- Use printf() rather than debug() to report initcall failures
(Quentin S.)
- initcall_run_f(): replace one erroneous call to WATCHDOG_INIT() with
WATCHDOG_RESET() (Ilias A.)
- Fix relocate_code() in arch/sh/lib/board.c to address CI failures with
r2dplus (https://lists.denx.de/pipermail/u-boot/2025-January/576213.html)
(Tom R.)
- Add comments to initcall_run_f() and initcall_run_r() (Simon G.)
Changes in v2:
- INTICALL() and INITCALL_EVT() now call hang() immediately on error
- Fixed typo: s/intcall_run_f_r/initcall_run_f_r/
*** BLURB HERE ***
Jerome Forissier (2):
common: board: make static calls
initcall: remove initcall_run_list()
common/board_f.c | 218 ++++++++++++++++++++-------------------
common/board_r.c | 251 +++++++++++++++++++++++----------------------
include/initcall.h | 45 ++++----
lib/Makefile | 1 -
lib/initcall.c | 102 ------------------
5 files changed, 263 insertions(+), 354 deletions(-)
delete mode 100644 lib/initcall.c
--
2.43.0
next reply other threads:[~2025-01-06 14:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 14:40 Jerome Forissier [this message]
2025-01-06 14:40 ` [PATCH v4 1/2] common: board: make static calls Jerome Forissier
2025-01-06 15:54 ` Caleb Connolly
2025-01-06 14:40 ` [PATCH v4 2/2] initcall: remove initcall_run_list() Jerome Forissier
2025-01-17 21:46 ` [PATCH v4 0/2] Static initcalls Tom Rini
2025-01-21 16:05 ` Jerome Forissier
2025-01-21 16:11 ` Tom Rini
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=cover.1736174204.git.jerome.forissier@linaro.org \
--to=jerome.forissier@linaro.org \
--cc=ilias.apalodimas@linaro.org \
--cc=michal.simek@amd.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--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