diff options
| author | Sughosh Ganu <[email protected]> | 2025-06-17 16:13:41 +0530 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-06-25 09:50:37 -0600 |
| commit | 6e4675b8e5d8d52d871042d6ac3429d6d1daf875 (patch) | |
| tree | 87a1997ba60d2b3aa87432a30029f90efcae6798 /include | |
| parent | 9d37a3d6e8b862071edfcb9ee95a0fbe45606918 (diff) | |
lmb: replace the lmb_alloc() and lmb_alloc_base() API's
There currently are two API's for requesting memory from the LMB
module, lmb_alloc() and lmb_alloc_base(). The function which does the
actual allocation is the same. Use the earlier introduced API
lmb_alloc_mem() for both types of allocation requests.
Signed-off-by: Sughosh Ganu <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/lmb.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/include/lmb.h b/include/lmb.h index 8906b42181f..34dbc25759d 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -34,9 +34,13 @@ /** * enum lmb_mem_type - type of memory allocation request * @LMB_MEM_ALLOC_ADDR: request for a particular region of memory + * @LMB_MEM_ALLOC_ANY: allocate any available memory region + * @LMB_MEM_ALLOC_MAX: allocate memory below a particular address */ enum lmb_mem_type { LMB_MEM_ALLOC_ADDR = 1, + LMB_MEM_ALLOC_ANY, + LMB_MEM_ALLOC_MAX, }; /** @@ -130,27 +134,9 @@ void lmb_add_memory(void); long lmb_add(phys_addr_t base, phys_size_t size); -phys_addr_t lmb_alloc(phys_size_t size, ulong align); phys_size_t lmb_get_free_size(phys_addr_t addr); /** - * lmb_alloc_base() - Allocate specified memory region with specified - * attributes - * @size: Size of the region requested - * @align: Alignment of the memory region requested - * @max_addr: Maximum address of the requested region - * @flags: Memory region attributes to be set - * - * Allocate a region of memory with the attributes specified through the - * parameter. The max_addr parameter is used to specify the maximum address - * below which the requested region should be allocated. - * - * Return: Base address on success, 0 on error. - */ -phys_addr_t lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t max_addr, - uint flags); - -/** * lmb_is_reserved_flags() - Test if address is in reserved region with flag * bits set * @addr: Address to be tested |
