Re: [PATCH v2 4/5] efi: Use efi_mem_reserve() to reserve the memory attribute table
From: Breno Leitao
Date: Wed Apr 01 2026 - 13:53:49 EST
On Wed, Apr 01, 2026 at 02:23:56PM +0200, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
Reviewed-by: Breno Leitao <leitao@xxxxxxxxxx>
> ---
> 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.