Re: [PATCH v2 2/5] x86/efi: Gather initial memory reservation and table handling logic

Ard Biesheuvel
2026-04-01T14:59:37Z

On Wed, 1 Apr 2026, at 16:49, Breno Leitao wrote:
> On Wed, Apr 01, 2026 at 02:23:54PM +0200, Ard Biesheuvel wrote:
>> From: Ard Biesheuvel <ardb@kernel.org>
>>
>> Move the back-to-back calls to various EFI routines related to
>> processing of firmware tables and reserving the associated memory
>> into a helper function. This is tidier, and will avoid the need to
>> add yet another function call there in a subsequent patch.
>>
>> Reviewed-by: Gregory Price <gourry@gourry.net>
>> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
>
> Reviewed-by: Breno Leitao <leitao@debian.org>
>

Thanks

>> +void efi_init_reservations(void);
>
> Do you neeed __init here, as the declaration below? I know that
> "extern" is not necessary, but isn't __init?
>

No, it's not. Initness is a property of the definition not the
declaration. It decides which ELF section the code is emitted into,
and a declaration does not produce any code.

The section attribute is permitted on declarations by most compilers,
and I can see how it may be informative, but it can also easily get
out of sync so I prefer to omit it.