From: Caleb Connolly Date: Fri, 18 Oct 2024 13:51:07 +0000 (+0200) Subject: lmb: notify when adjacent regions are added X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=491195769dbeed62f0a2f20cfa198bd2b297720e;p=u-boot.git lmb: notify when adjacent regions are added lmb_add_region() returns a positive integer if the added regions causes existing regions to be coalesced. We still want to notify the EFI subsystem about these added regions though, so adjust lmb_add() to only bail on errors. This fixes EFI memory allocation on boards with adjacent memory banks as is the case on several Qualcomm boards like the RB3 Gen 2. Fixes: 2f6191526a13 (lmb: notify of any changes to the LMB memory map) Signed-off-by: Caleb Connolly Reviewed-by: Sughosh Ganu Tested-by: Neil Armstrong Reviewed-by: Ilias Apalodimas --- diff --git a/lib/lmb.c b/lib/lmb.c index 78fe2d4de7..7e90f17876 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -487,7 +487,7 @@ long lmb_add(phys_addr_t base, phys_size_t size) struct alist *lmb_rgn_lst = &lmb.free_mem; ret = lmb_add_region(lmb_rgn_lst, base, size); - if (ret) + if (ret < 0) return ret; if (lmb_should_notify(LMB_NONE))