efi/x86: Clean up efi_systab_init() routine for legibility
authorArd Biesheuvel <ardb@kernel.org>
Fri, 3 Jan 2020 11:39:45 +0000 (12:39 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 10 Jan 2020 17:55:03 +0000 (18:55 +0100)
commit5b279a262f5413889529802b82e153e87ee6bef8
tree25a7cff518f6399cf972492a44a8591b4cdf4dbd
parent33b85447fa61946b94fea93dd4bc24772af14d54
efi/x86: Clean up efi_systab_init() routine for legibility

Clean up the efi_systab_init() routine which maps the EFI system
table and copies the relevant pieces of data out of it.

The current routine is very difficult to read, so let's clean that
up. Also, switch to a R/O mapping of the system table since that is
all we need.

Finally, use a plain u64 variable to record the physical address of
the system table instead of pointlessly stashing it in a struct efi
that is never used for anything else.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Arvind Sankar <nivedita@alum.mit.edu>
Cc: Matthew Garrett <mjg59@google.com>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20200103113953.9571-13-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/platform/efi/efi.c