Skip to contentSkip to conversation

efi: libstub: drop pointless get_memory_map() call

PATCH In review Ard Biesheuvel 2 participants 2 messages Oct 18, 2022 – Oct 19, 2022

Subsystems (2)
lore
Share & tools
lore

Ard Biesheuvel

author maintainer
#0 lore raw

PATCH 1/1 efi: libstub: drop pointless get_memory_map() call

commit d80ca810f096ff66f451e7a3ed2f0cd9ef1ff519 upstream

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 <[email protected]> # v4.14+
Fixes 24d7c494ce46 ("efi/arm-stub: Round up FDT allocation to mapping size")
---
 drivers/firmware/efi/libstub/fdt.c | 8 --------
 1 file changed, 8 deletions(-)

This is a backport for v5.4 and older, where the patch in question did not apply cleanly on the first attempt. Please apply.

drivers/firmware/efi/libstub/fdt.c +0 -8
index dba296a44f4e..2a1a587edef9 100644
@@ -301,14 +301,6 @@ efi_status_t allocate_new_fdt_and_exit_boot(efi_system_table_t *sys_table,
 		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(sys_table, &map);
-	if (status != EFI_SUCCESS)
-		goto fail_free_new_fdt;
-
 	status = update_fdt(sys_table, (void *)fdt_addr, fdt_size,
 			    (void *)*new_fdt_addr, MAX_FDT_SIZE, cmdline_ptr,
 			    initrd_addr, initrd_size);
Signature · 1 line
2.35.1
maintainer
#1 lore raw
Quoted 8 lines · Ard Biesheuvel

commit d80ca810f096ff66f451e7a3ed2f0cd9ef1ff519 upstream

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 <[email protected]> # v4.14+
Fixes 24d7c494ce46 ("efi/arm-stub: Round up FDT allocation to mapping size")
Quoted 6 lines
---
 drivers/firmware/efi/libstub/fdt.c | 8 --------
 1 file changed, 8 deletions(-)

This is a backport for v5.4 and older, where the patch in question did not apply cleanly on the first attempt. Please apply.

Thanks, now queued up.

greg k-h