diff options
author | Simon Glass <sjg@chromium.org> | 2023-12-27 13:07:00 -0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-12-31 07:21:02 -0700 |
commit | 1a2e02f955f98395142415d7c6cc14e4df903969 (patch) | |
tree | 59f3057b5cede46f4dcccf2fa9ecdcea6facf032 /arch/x86 | |
parent | e748e4b780057872b4a7192db87476adaa8b501c (diff) | |
download | u-boot-1a2e02f955f98395142415d7c6cc14e4df903969.tar.gz |
bloblist: Adjust API to align in powers of 2
The updated bloblist structure stores the alignment as a power-of-two
value in its structures. Adjust the API to use this, to avoid needing to
calling ilog2().
Update the bloblist alignment from 16 bytes to 8 bytes.
Drop a stale comment while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Co-developed-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/lib/tables.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c index 5b5070f7ca5..d43e77d3730 100644 --- a/arch/x86/lib/tables.c +++ b/arch/x86/lib/tables.c @@ -16,6 +16,7 @@ #include <asm/mpspec.h> #include <asm/tables.h> #include <asm/coreboot_tables.h> +#include <linux/log2.h> DECLARE_GLOBAL_DATA_PTR; @@ -104,7 +105,7 @@ int write_tables(void) if (!gd->arch.table_end) gd->arch.table_end = rom_addr; rom_addr = (ulong)bloblist_add(table->tag, size, - table->align); + ilog2(table->align)); if (!rom_addr) return log_msg_ret("bloblist", -ENOBUFS); |