[PATCH v5 0/7] lmb: use a single API for all allocations
Tom Rini
trini at konsulko.com
Wed Jun 25 21:16:46 CEST 2025
On Tue, 17 Jun 2025 16:13:39 +0530, Sughosh Ganu wrote:
> 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.
>
> [...]
Applied to u-boot/next, thanks!
[1/7] lmb: replace lmb_reserve() and lmb_alloc_addr() API's
commit: 9d37a3d6e8b862071edfcb9ee95a0fbe45606918
[2/7] lmb: replace the lmb_alloc() and lmb_alloc_base() API's
commit: 6e4675b8e5d8d52d871042d6ac3429d6d1daf875
[3/7] lmb: staticise lmb_add_memory()
commit: 3faffba6f19834bdda12b7942e545ff4a4a6e18b
[4/7] lmb: use a single function to free up memory
commit: 745f981f7083f70856b3db307b759774957a8082
[5/7] lmb: use a single function to check for allocation and reservation requests
commit: 7aa19c3667d1cd23417f4ec7f5cb5dab260cfbf3
[6/7] mach-snapdragon: add a check before copying FDT to fdt_addr_r
commit: 4641419f41b347a38a07f19c809b7aab63864dd1
[7/7] doc: add lmb documentation
commit: 9b0ed9e69bcbc6af7115ddaee9536cf63b800c1d
--
Tom
More information about the U-Boot
mailing list