diff options
author | Tom Rini <trini@konsulko.com> | 2023-08-21 17:32:17 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-08-21 17:32:17 -0400 |
commit | 7e6e40c572332b3835c5cb48a08e1d8d404c871c (patch) | |
tree | cf8ebf03fbe72c1334880f75fe2c9f71c7bb95ff /include/lmb.h | |
parent | 3881c9fbb7fdd98f6eae5cd33f7e9abe9455a585 (diff) | |
parent | 976fb2ffa3875a7bed9866bf5cf939a81c423ef8 (diff) |
Merge tag 'v2023.10-rc3' into next
Prepare v2023.10-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/lmb.h')
-rw-r--r-- | include/lmb.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/lmb.h b/include/lmb.h index 07bf22144e..231b68b27d 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -116,16 +116,31 @@ phys_addr_t __lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong align, phys_addr_t max_addr); phys_addr_t lmb_alloc_addr(struct lmb *lmb, phys_addr_t base, phys_size_t size); phys_size_t lmb_get_free_size(struct lmb *lmb, phys_addr_t addr); + +/** + * lmb_is_reserved() - test if address is in reserved region + * + * The function checks if a reserved region comprising @addr exists. + * + * @lmb: the logical memory block struct + * @addr: address to be tested + * Return: 1 if reservation exists, 0 otherwise + */ int lmb_is_reserved(struct lmb *lmb, phys_addr_t addr); + /** - * lmb_is_reserved_flags - test if tha address is in reserved region with a bitfield flag + * lmb_is_reserved_flags() - test if address is in reserved region with flag bits set + * + * The function checks if a reserved region comprising @addr exists which has + * all flag bits set which are set in @flags. * * @lmb: the logical memory block struct * @addr: address to be tested - * @flags: flags bitfied to be tested - * Return: if not reserved or reserved without the requested flag else 1 + * @flags: bitmap with bits to be tested + * Return: 1 if matching reservation exists, 0 otherwise */ int lmb_is_reserved_flags(struct lmb *lmb, phys_addr_t addr, int flags); + long lmb_free(struct lmb *lmb, phys_addr_t base, phys_size_t size); void lmb_dump_all(struct lmb *lmb); |