Re: [PATCH v3 02/17] x86/efi: Drop redundant EFI_PARAVIRT check

Mike Rapoport <[email protected]>
Newsgroups org.kernel.vger.linux-efi,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, Apr 23, 2026 at 05:20:27PM +0200, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <[email protected]>
> 
> efi_memblock_x86_reserve_range() exits early if EFI_PARAVIRT is set, so
> there is no point in checking it a second time further down.
> 
> Signed-off-by: Ard Biesheuvel <[email protected]>

Reviewed-by: Mike Rapoport (Microsoft) <[email protected]>

> ---
>  arch/x86/platform/efi/efi.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 0c39adb96b91..1b7a0cd54d08 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -211,11 +211,9 @@ int __init efi_memblock_x86_reserve_range(void)
>  	data.desc_size		= e->efi_memdesc_size;
>  	data.desc_version	= e->efi_memdesc_version;
>  
> -	if (!efi_enabled(EFI_PARAVIRT)) {
> -		rv = efi_memmap_init_early(&data);
> -		if (rv)
> -			return rv;
> -	}
> +	rv = efi_memmap_init_early(&data);
> +	if (rv)
> +		return rv;
>  
>  	if (add_efi_memmap || do_efi_soft_reserve())
>  		do_add_efi_memmap();
> -- 
> 2.54.0.rc2.544.gc7ae2d5bb8-goog
> 

-- 
Sincerely yours,
Mike.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.