Merge patch series "lmb: miscellaneous fixes and improvements"
authorTom Rini <trini@konsulko.com>
Tue, 18 Mar 2025 01:39:36 +0000 (19:39 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 18 Mar 2025 01:39:36 +0000 (19:39 -0600)
commit3baec72dcb2c275e3b9d509fc8bf4ae9f3f83aa3
tree8622be6324b92dd01d403c6cabdf7ce8455f5d35
parent6a5917fba18b16584022a98e7a19da766f883381
parent2bf5811e22efffe37bf5dccb8d13529c51fc65dd
Merge patch series "lmb: miscellaneous fixes and improvements"

Sughosh Ganu <sughosh.ganu@linaro.org> says:

The patch series contains some fixes and improvements in the lmb
code, along with addition of corresponding test cases for the changes
made.

The lmb_reserve() function currently does not check if the requested
reservation would overlap with existing reserved regions. While some
scenarios are being handled, some corner cases still exist. These are
being handled by patch 1, along with adding test cases for these
scenarios.

Patch 2 is handling the case of reserving a new region of memory, but
that region overlaps with an existing region. The current code only
handles one particular scenario, but prints a message for the other
scenario of an encompassing overlap and returns back. The patch
handles the encompassing overlap.

Patch 3 is an improvement whereby we allow coalescing a newly reserved
region with an existing region. The current code exits this check
prematurely.

Patch 4 is removing a now superfluous check for overlapping regions
with flag other than LMB_NONE. This now gets handled at an earlier
point in lmb_reserve().

Patch 5 is clubbing the functionality to check if two regions are
adjacent, or overlap, allowing some code re-use.

Patch 6 is optimising the lmb_alloc() function by having it call
_lmb_alloc_base() directly.

Link: https://lore.kernel.org/r/20250303133231.405279-1-sughosh.ganu@linaro.org