]> git.baikalelectronics.ru Git - uboot.git/commit
initcall: Move to inline function
authorAlexander Graf <agraf@suse.de>
Thu, 31 Jan 2019 15:06:23 +0000 (16:06 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 9 Feb 2019 12:50:58 +0000 (07:50 -0500)
commit9b9771a34a1992f9950b9a86f862e5f5120e118d
treebf9760e98aa2cb124b7779ac936f597392eb2e24
parentc494a6827488ec14b4232075d28760a54455bc5a
initcall: Move to inline function

The board_r init function was complaining that we are looping through
an array, calling all our tiny init stubs sequentially via indirect
function calls (which can't be speculated, so they are slow).

The solution to that is pretty easy though. All we need to do is inline
the function that loops through the functions and the compiler will
automatically convert almost all indirect calls into direct inlined code.

With this patch, the overall code size drops (by 40 bytes on riscv64)
and boot time should become measurably faster for every target.

Signed-off-by: Alexander Graf <agraf@suse.de>
common/board_r.c
include/initcall.h
lib/Makefile
lib/initcall.c [deleted file]