]> git.baikalelectronics.ru Git - kernel.git/commit
x86/efi: Consolidate region mapping logic
authorMatt Fleming <matt@codeblueprint.co.uk>
Mon, 20 Jun 2016 13:36:51 +0000 (14:36 +0100)
committerMatt Fleming <matt@codeblueprint.co.uk>
Fri, 9 Sep 2016 15:06:37 +0000 (16:06 +0100)
commitf073b95fdcd8ebca3d1352c44ae75ffd0e4889de
treeacb1cd132b80de200df5cce4563d624719692875
parentb62d473f14b19585872437e804e6d9e118df55e4
x86/efi: Consolidate region mapping logic

EFI regions are currently mapped in two separate places. The bulk of
the work is done in efi_map_regions() but when CONFIG_EFI_MIXED is
enabled the additional regions that are required when operating in
mixed mode are mapping in efi_setup_page_tables().

Pull everything into efi_map_regions() and refactor the test for
which regions should be mapped into a should_map_region() function.
Generously sprinkle comments to clarify the different cases.

Acked-by: Borislav Petkov <bp@suse.de>
Tested-by: Dave Young <dyoung@redhat.com> [kexec/kdump]
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> [arm]
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
arch/x86/platform/efi/efi.c
arch/x86/platform/efi/efi_64.c