public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Static initcalls
@ 2025-01-03 11:13 Jerome Forissier
  2025-01-03 11:13 ` [PATCH v3 1/5] common: board: Simplify array with function pointers with CONFIG_IS_ENABLED Jerome Forissier
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Jerome Forissier @ 2025-01-03 11:13 UTC (permalink / raw)
  To: u-boot
  Cc: Ilias Apalodimas, Tom Rini, Simon Glass, Michal Simek,
	Jerome Forissier

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: -2217 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 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/

Jerome Forissier (4):
  board_init_f(): use static calls
  board_init_f_r(): use static calls
  board_init_r(): use static calls
  initcall: remove initcall_run_list()

Michal Simek (1):
  common: board: Simplify array with function pointers with
    CONFIG_IS_ENABLED

 arch/sh/lib/board.c         |   9 +-
 common/board_f.c            | 214 ++++++++++++++-----------------
 common/board_r.c            | 245 ++++++++++++++----------------------
 include/initcall.h          |  45 +++----
 lib/Makefile                |   1 -
 lib/initcall.c              | 102 ---------------
 test/py/tests/test_trace.py |   8 +-
 7 files changed, 220 insertions(+), 404 deletions(-)
 delete mode 100644 lib/initcall.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-01-04 19:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03 11:13 [PATCH v3 0/5] Static initcalls Jerome Forissier
2025-01-03 11:13 ` [PATCH v3 1/5] common: board: Simplify array with function pointers with CONFIG_IS_ENABLED Jerome Forissier
2025-01-03 11:13 ` [PATCH v3 2/5] board_init_f(): use static calls Jerome Forissier
2025-01-03 11:13 ` [PATCH v3 3/5] board_init_f_r(): " Jerome Forissier
2025-01-03 11:13 ` [PATCH v3 4/5] board_init_r(): " Jerome Forissier
2025-01-04  1:54   ` Caleb Connolly
2025-01-04 19:40     ` Simon Glass
2025-01-03 11:13 ` [PATCH v3 5/5] initcall: remove initcall_run_list() Jerome Forissier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox