]> git.baikalelectronics.ru Git - kernel.git/commit
x86/efi: Test for EFI_MEMMAP functionality when iterating EFI memmap
authorMatt Fleming <matt@codeblueprint.co.uk>
Tue, 21 Jun 2016 22:11:38 +0000 (23:11 +0100)
committerMatt Fleming <matt@codeblueprint.co.uk>
Fri, 9 Sep 2016 15:06:34 +0000 (16:06 +0100)
commitb62d473f14b19585872437e804e6d9e118df55e4
tree729932471d136917598dc576d47ff6429a9791ea
parent782fc87daa1ece320790290a81815482940165d2
x86/efi: Test for EFI_MEMMAP functionality when iterating EFI memmap

Both efi_find_mirror() and efi_fake_memmap() really want to know
whether the EFI memory map is available, not just whether the machine
was booted using EFI. efi_fake_memmap() even has a check for
EFI_MEMMAP at the start of the function.

Since we've already got other code that has this dependency, merge
everything under one if() conditional, and remove the now superfluous
check from efi_fake_memmap().

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>
Cc: Taku Izumi <izumi.taku@jp.fujitsu.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
arch/x86/kernel/setup.c
drivers/firmware/efi/fake_mem.c