efi: Clean up config_parse_tables()
authorArd Biesheuvel <ardb@kernel.org>
Wed, 22 Jan 2020 13:40:57 +0000 (14:40 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Sun, 23 Feb 2020 20:59:42 +0000 (21:59 +0100)
commit06c0bd93434c5b9b284773f90bb054aff591d5be
treee92fb1e0a3943601561e065816450a6a5c916c6f
parent3a0701dc7ff8ebe1031a9f64c99c638929cd2d70
efi: Clean up config_parse_tables()

config_parse_tables() is a jumble of pointer arithmetic, due to the
fact that on x86, we may be dealing with firmware whose native word
size differs from the kernel's.

This is not a concern on other architectures, and doesn't quite
justify the state of the code, so let's clean it up by adding a
non-x86 code path, constifying statically allocated tables and
replacing preprocessor conditionals with IS_ENABLED() checks.

Tested-by: Tony Luck <tony.luck@intel.com> # arch/ia64
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/ia64/kernel/efi.c
arch/x86/platform/efi/efi.c
drivers/firmware/efi/arm-init.c
drivers/firmware/efi/efi.c
include/linux/efi.h