summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-06-02 09:30:33 -0600
committerTom Rini <[email protected]>2026-06-02 09:30:33 -0600
commitb5f2880261e968e031db6f85e549b1a6ea35e8c8 (patch)
tree95f240d4291b1c923cbd14d56502b32a470c7c27 /include
parent0a46055d96ac627c05180cdeaa187a9fdf6b7973 (diff)
parent5ab1600213608129ea63fc3046f46349515821d6 (diff)
Merge patch series "Clean up bloblist initialization"
Tom Rini <[email protected]> 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/[email protected]
Diffstat (limited to 'include')
-rw-r--r--include/bloblist.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/include/bloblist.h b/include/bloblist.h
index e67b2a76358..4c578772965 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -489,9 +489,23 @@ const char *bloblist_tag_name(enum bloblist_tag_t tag);
int bloblist_reloc(void *to, uint to_size);
/**
+ * bloblist_exists() - Check for the prior existence of a bloblist
+ *
+ * This will check for a transfer list having been passed via standard
+ * convention. If CONFIG_BLOBLIST_PASSAGE_MANDATORY is selected and one is not
+ * found, we return false.
+ *
+ * If CONFIG_BLOBLIST_FIXED is selected, it uses CONFIG_BLOBLIST_ADDR and
+ * CONFIG_BLOBLIST_SIZE to check for a bloblist.
+ *
+ * Return: true if found, false if not
+ */
+bool bloblist_exists(void);
+
+/**
* bloblist_init() - Init the bloblist system with a single bloblist
*
- * This locates and sets up the blocklist for use.
+ * This creates a bloblist for use, if not already found.
*
* If CONFIG_BLOBLIST_FIXED is selected, it uses CONFIG_BLOBLIST_ADDR and
* CONFIG_BLOBLIST_SIZE to set up a bloblist for use by U-Boot.
@@ -508,22 +522,6 @@ int bloblist_reloc(void *to, uint to_size);
*/
int bloblist_init(void);
-#if CONFIG_IS_ENABLED(BLOBLIST)
-/**
- * bloblist_maybe_init() - Init the bloblist system if not already done
- *
- * Calls bloblist_init() if the GD_FLG_BLOBLIST_READY flag is not set
- *
- * Return: 0 if OK, -ve on error
- */
-int bloblist_maybe_init(void);
-#else
-static inline int bloblist_maybe_init(void)
-{
- return 0;
-}
-#endif /* BLOBLIST */
-
/**
* bloblist_check_reg_conv() - Check whether the bloblist is compliant to
* the register conventions according to the