]> git.baikalelectronics.ru Git - kernel.git/commitdiff
efi: libstub: drop pointless get_memory_map() call
authorArd Biesheuvel <ardb@kernel.org>
Thu, 15 Sep 2022 17:00:24 +0000 (19:00 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 20 Sep 2022 17:34:22 +0000 (19:34 +0200)
Currently, the non-x86 stub code calls get_memory_map() redundantly,
given that the data it returns is never used anywhere. So drop the call.

Cc: <stable@vger.kernel.org> # v4.14+
Fixes: 5aa8a3aaebfe ("efi/arm-stub: Round up FDT allocation to mapping size")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/fdt.c

index fe567be0f118beb18ec061850e17b3c8ae77945a..804f542be3f28233ca1e11c80f2e87c9b6c8b834 100644 (file)
@@ -280,14 +280,6 @@ efi_status_t allocate_new_fdt_and_exit_boot(void *handle,
                goto fail;
        }
 
-       /*
-        * Now that we have done our final memory allocation (and free)
-        * we can get the memory map key needed for exit_boot_services().
-        */
-       status = efi_get_memory_map(&map);
-       if (status != EFI_SUCCESS)
-               goto fail_free_new_fdt;
-
        status = update_fdt((void *)fdt_addr, fdt_size,
                            (void *)*new_fdt_addr, MAX_FDT_SIZE, cmdline_ptr,
                            initrd_addr, initrd_size);