Skip to content
  • Matt Fleming's avatar
    x86/efi: Test for EFI_MEMMAP functionality when iterating EFI memmap · 4971531a
    Matt Fleming authored
    
    
    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: default avatarArd 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: default avatarMatt Fleming <matt@codeblueprint.co.uk>
    4971531a