summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-06-25 09:57:01 -0600
committerTom Rini <trini@konsulko.com>2025-06-25 09:57:01 -0600
commitb40d7b8f72f181d539b03c807d2dcaf864af552e (patch)
tree09c88d38702458d0020d06ca0898ae0b62d4cc73 /arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
parent0862a8c48f226fffb832fd2a8501d70e68711e95 (diff)
parent9b0ed9e69bcbc6af7115ddaee9536cf63b800c1d (diff)
Merge patch series "lmb: use a single API for all allocations"
Sughosh Ganu <sughosh.ganu@linaro.org> says: The LMB module has a bunch for API's which are used for allocating memory. There are a couple of API's for requesting memory, and two more for reserving regions of memory. Replace these different API's with a single one, lmb_alloc_mem(). The type of allocation to be made is specified through one of the parameters to the function. Additionally, the two API's for reserving regions of memory, lmb_reserve() and lmb_alloc_addr() are the same with one difference. One can reserve any memory region with lmb_reserve(), while lmb_alloc_addr() actually checks that the memory region being requested is part of the LMB memory map. Reserving memory that is not part of the LMB memory map is pretty futile -- the allocation functions do not allocate memory which has not been added to the LMB memory map. This series also removes the functionality allowing for reserving memory regions outside the LMB memory map. Any request for reserving a region of memory outside the LMB memory map now returns an -EINVAL error. Certain places in the common code using the LMB API's were not checking the return value of the functions. Checks have been added for them. There are some calls being made from the architecture/platform specific code which too do not check the return value. Those have been kept the same, as I do not have the platform with me to check if it causes any issues on those platforms. In addition, there is a patch which refactors code in lmb_overlaps_region() and lmb_can_reserve_region() so that both functionalities can be put in a single function, lmb_overlap_checks(). Finally, a new patch has been added which checks the return value of the lmb allocation function before copying the device-tree to the allocated address. Link: https://lore.kernel.org/r/20250617104346.1379981-1-sughosh.ganu@linaro.org [trini: Rework arch/arm/mach-snapdragon/board.c merge] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c')
0 files changed, 0 insertions, 0 deletions