Merge patch series "Clean up bloblist initialization"

Tom Rini <trini@konsulko.com> says:

This series does a few small but important cleanups to how we check for,
and initialize a bloblist. The first thing is that the way things are
done today, our HANDOFF code can only work with a fixed bloblist
location, so express that requirement in Kconfig. Next, we demote the
scary message about "Bloblist at ... not found" to a debug because we
most often see that because the bloblist doesn't (and can't) exist yet.
Finally, we remove bloblist_maybe_init and split this in to an exists
and a real init. This results in practically no growth (between 8 bytes
growth to 12 bytes saved, with some outliers saving much more thanks to
knowing it's impossible to have been passed a bloblist yet). This also
cleans up some of the code around checking for / knowing about a
bloblist existing.

Link: https://lore.kernel.org/r/20260519162225.770071-1-trini@konsulko.com
This commit is contained in:
Tom Rini
2026-06-02 09:30:33 -06:00
10 changed files with 106 additions and 120 deletions

View File

@@ -1822,17 +1822,12 @@ int fdtdec_setup(void)
int ret = -ENOENT;
/*
* If allowing a bloblist, check that first. There was discussion about
* adding an OF_BLOBLIST Kconfig, but this was rejected.
*
* The necessary test is whether the previous phase passed a bloblist,
* not whether this phase creates one.
* If allowing a bloblist, check that first. The necessary test is
* whether the previous phase passed a bloblist, not whether this phase
* creates one.
*/
if (CONFIG_IS_ENABLED(BLOBLIST) &&
(xpl_prev_phase() != PHASE_TPL ||
IS_ENABLED(CONFIG_TPL_BLOBLIST))) {
ret = bloblist_maybe_init();
if (!ret) {
if (CONFIG_IS_ENABLED(BLOBLIST) && (xpl_phase() > PHASE_TPL)) {
if (bloblist_exists()) {
gd->fdt_blob = bloblist_find(BLOBLISTT_CONTROL_FDT, 0);
if (gd->fdt_blob) {
gd->fdt_src = FDTSRC_BLOBLIST;