On 9/12/26 2:34 PM, Balaji Selvanathan wrote:
_lmb_alloc_addr() currently returns -EINVAL when a reservation overlaps an available memory bank but extends beyond the bank boundary. It returns -EFAULT when the reservation does not overlap any available memory bank.
It returns EFAULT when the reservation is attempted over memory that is not present, is that what the second sentence means ?
From LMB's perspective, neither request can be satisfied because the requested reservation is not fully contained within an available region. Callers therefore cannot make practical use of the distinction.
Have you confirmed this for every possible caller ?
boot_fdt_handle_region() treats -EFAULT as a non-fatal condition and silently skips the reservation, while -EINVAL causes a boot-time error message to be printed. For bank-boundary overlap cases this message is misleading because no internal LMB error has occurred; the reservation simply does not fit within available memory.
If reservation does not fit into available memory, that sounds like a fatal error.
The commit message STILL does not explain why do you think the overlap is not a serious error, and why it could be ignored. I already asked this in V1, and got pointed to this V2 which only contains more blurb in the commit message, but no actual answer to my question.
