[PATCH v3 1/4] lmb: Do not use global LMB variable in _lmb_free()
Janne Grunau via B4 Relay
devnull+j.jannau.net at kernel.org
Mon Nov 11 07:56:31 CET 2024
From: Janne Grunau <j at jannau.net>
It will be re-used with a lmb list pointer as argument for IOVA
allocations in the apple_dart iommu driver.
Reviewed-by: Tom Rini <trini at konsulko.com>
Signed-off-by: Janne Grunau <j at jannau.net>
---
lib/lmb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/lmb.c b/lib/lmb.c
index 8b306e4de8e1fe35c44d0b4b73424cdb007905b4..cc2554dfa947182806c37b31da292becc1c868a1 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -492,10 +492,10 @@ long lmb_add(phys_addr_t base, phys_size_t size)
return lmb_map_update_notify(base, size, MAP_OP_ADD, LMB_NONE);
}
-static long _lmb_free(phys_addr_t base, phys_size_t size)
+static long _lmb_free(struct alist *lmb_rgn_lst, phys_addr_t base,
+ phys_size_t size)
{
struct lmb_region *rgn;
- struct alist *lmb_rgn_lst = &lmb.used_mem;
phys_addr_t rgnbegin, rgnend;
phys_addr_t end = base + size - 1;
int i;
@@ -558,7 +558,7 @@ long lmb_free_flags(phys_addr_t base, phys_size_t size,
{
long ret;
- ret = _lmb_free(base, size);
+ ret = _lmb_free(&lmb.used_mem, base, size);
if (ret < 0)
return ret;
--
2.47.0
More information about the U-Boot
mailing list