Re: [PATCH v2 4/5] efi: Use efi_mem_reserve() to reserve the memory attribute table

Breno Leitao
2026-04-01T17:39:58Z

On Wed, Apr 01, 2026 at 02:23:56PM +0200, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@kernel.org>
>
> Use efi_mem_reserve() rather than memblock_reserve() to reserve the EFI
> memory attributes table. This is needed on x86, where memblock_reserve()
> is not sufficient for assets that may be placed in EFI boot services
> data memory.
>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

Reviewed-by: Breno Leitao <leitao@debian.org>

> ---
> drivers/firmware/efi/memattr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/efi/memattr.c b/drivers/firmware/efi/memattr.c
> index b83f1c5a9164..785b7fc687fe 100644
> --- a/drivers/firmware/efi/memattr.c
> +++ b/drivers/firmware/efi/memattr.c
> @@ -75,7 +75,7 @@ void __init efi_memattr_init(void)
> }
>
> tbl_size = sizeof(*tbl) + tbl->num_entries * tbl->desc_size;
> - memblock_reserve(efi_mem_attr_table, tbl_size);

nit: memblock_reserve seems to be the only memblock usage in the file,
so after this patch, the #include <linux/memblock.h> becomes dead.