Skip to content
Commit 870b4333 authored by Borislav Petkov's avatar Borislav Petkov
Browse files

x86/ioremap: Fix CONFIG_EFI=n build



In order to use efi_mem_type(), one needs CONFIG_EFI enabled. Otherwise
that function is undefined. Use IS_ENABLED() to check and avoid the
ifdeffery as the compiler optimizes away the following unreachable code
then.

Fixes: 985e537a ("x86/ioremap: Map EFI runtime services data as encrypted for SEV")
Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Tested-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/7561e981-0d9b-d62c-0ef2-ce6007aff1ab@infradead.org
parent fb33c651
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment