]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:01:59 +0000 (11:01 +0200)
commit3c81dc4568b75387102e2c88fdf009b6bf101e47
tree4a3f3847b72d3be28fcf88578d1b03b34158c054
parent2ccb6bf3fa3ab04067968ac3deeb231e1fd5ae02
x86/ioremap: Fix CONFIG_EFI=n build

commit 65c9841e8427dee67061c269cab4f13873512c70 upstream.

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: 167d1d9ebac5 ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/mm/ioremap.c