diff options
| author | Ilias Apalodimas <[email protected]> | 2024-10-23 18:26:36 +0300 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-10-29 16:17:47 -0600 |
| commit | ede2361998e5e2e6d89abb08f1f0c816d63ed221 (patch) | |
| tree | 742e8626096b12523dddee1f072a3e3c03db0918 /lib/lmb.c | |
| parent | f6fb6a885120187ddcff9489ff84b1405eb132fa (diff) | |
lmb: Remove lmb_alloc_flags()
lmb_alloc_flags() & lmb_alloc_base_flags() are just a wrappers for
_lmb_alloc_base(). Since the only difference is the max address of the
allowed allocation which _lmb_alloc_base() already supports with the
LMB_ALLOC_ANYWHERE flag, remove one of them.
Keep the lmb_alloc_base_flags() which also prints an error on failures
and adjust efi_allocate_pages() to only use one of them.
While at it clean up the duplicate function description from the header
file.
Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'lib/lmb.c')
| -rw-r--r-- | lib/lmb.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/lmb.c b/lib/lmb.c index c6c0d0f9a7c..9423301cdbc 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -27,9 +27,6 @@ DECLARE_GLOBAL_DATA_PTR; #define MAP_OP_FREE (u8)0x2 #define MAP_OP_ADD (u8)0x3 -#define LMB_ALLOC_ANYWHERE 0 -#define LMB_ALIST_INITIAL_SIZE 4 - static struct lmb lmb; static bool lmb_should_notify(enum lmb_flags flags) @@ -671,23 +668,6 @@ phys_addr_t lmb_alloc(phys_size_t size, ulong align) return lmb_alloc_base(size, align, LMB_ALLOC_ANYWHERE); } -/** - * lmb_alloc_flags() - Allocate memory region with specified attributes - * @size: Size of the region requested - * @align: Alignment of the memory region requested - * @flags: Memory region attributes to be set - * - * Allocate a region of memory with the attributes specified through the - * parameter. - * - * Return: base address on success, 0 on error - */ -phys_addr_t lmb_alloc_flags(phys_size_t size, ulong align, uint flags) -{ - return _lmb_alloc_base(size, align, LMB_ALLOC_ANYWHERE, - flags); -} - phys_addr_t lmb_alloc_base(phys_size_t size, ulong align, phys_addr_t max_addr) { phys_addr_t alloc; |
