]> git.baikalelectronics.ru Git - kernel.git/commit
x86/ioremap: Fix CONFIG_EFI=n build
authorBorislav Petkov <bp@suse.de>
Wed, 18 Mar 2020 18:27:48 +0000 (19:27 +0100)
committerBorislav Petkov <bp@suse.de>
Thu, 19 Mar 2020 09:55:56 +0000 (10:55 +0100)
commit6dd28df8a05cd8bd688e829c8832417fa78ed2c6
tree88187aa363c35ddf18c39cea871a7f7e6c23c796
parent300f50a3847de83aa4b2e44fa28dd668de331982
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: 186ad78a6df4 ("x86/ioremap: Map EFI runtime services data as encrypted for SEV")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Randy 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
arch/x86/mm/ioremap.c