[PATCH 3/4] lmb: check for a region's coalescing with all existing regions
Quentin Schulz
quentin.schulz at cherry.de
Mon Feb 17 16:29:22 CET 2025
Hi Sughosh,
On 2/13/25 2:11 PM, Sughosh Ganu wrote:
> The lmb_add_region_flags() first checks if the new region to be added
> can be coalesced with existing regions. The check stops if the two
> regions are adjecent but their flags do not match. However, it is
> possible that the newly added region might be adjacent with the next
> existing region and with matching flags. Check for this possibility by
> not breaking out of the loop.
>
What do you mean exactly?
I know nothing about LMB, but I assume a region can only ever exist once
and with one set of flags? This means a region can only ever have two
adjacent regions, before itself and after itself.
It doesn't make sense to continue iterating if the adjacent region that
has a different flag is after the region to be created since we won't
find a new one, so we could break if base1 < base2 for ret > 0 below?
What do you think?
Cheers,
Quentin
More information about the U-Boot
mailing list