From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CA1A7C for ; Tue, 20 Sep 2022 18:36:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C369C433D7; Tue, 20 Sep 2022 18:36:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663698965; bh=TJjBRuCFTW+TJ1tt9NdDPb5mim7RRsT5BJz/uob9soA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=laYdq+TGmx+vSPPemLSoDGDOXD9nrqAi86aEbqfSRwGW8L6xr7EumHGREJgqXpUbS ZXoNZplMXJ+c60i0BC2T80TUt0lZpADP3emU2cNipFlNIUfL9ULPG0cPrcv9Try9di 1VoCOC2vQOoYD+hCYWCrYqwoqjjpQ3yV7SvHQmdUYrMmsSP49oR4BLKcYV4dNPkvLR ItJkQ8BtzO8LIgl0AWqtns8pmrhq2kIv2Dot9c6DxhJ3CShuhi6ocRHr0g45Ac8Z23 nx8XBakZuzkpL6RCojs2yac8wzq3LElQIz9R5BpznDjLt1EcUlX3yWmvWUb6su2ikq FgBCw5WBQdjlA== From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: loongarch@lists.linux.dev, Ard Biesheuvel , Arnd Bergmann , Ilias Apalodimas , Huacai Chen , Xi Ruoyao , stable@vger.kernel.org Subject: [PATCH v2 1/8] efi: libstub: drop pointless get_memory_map() call Date: Tue, 20 Sep 2022 20:35:47 +0200 Message-Id: <20220920183554.3870247-2-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220920183554.3870247-1-ardb@kernel.org> References: <20220920183554.3870247-1-ardb@kernel.org> Precedence: bulk X-Mailing-List: loongarch@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1124; i=ardb@kernel.org; h=from:subject; bh=TJjBRuCFTW+TJ1tt9NdDPb5mim7RRsT5BJz/uob9soA=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBjKgf9KlM+G5MYutM2WkSBF4HCuh+vKaoUimCOFi8b OqVzWv6JAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCYyoH/QAKCRDDTyI5ktmPJHMWDA C+8E6HThM1auFgXloRCoGjtyYoFyaGcHeX6VIoxk1dddKLl1uW/4gKJocwNfvHuvR4JybPwquSJqaf EwZx/uLxGZSBDN3OXMOFei+5pTmD+3I/rIk1/nvKy8CLg67nwX7YkF7YXGUgTzr3hpCeiUguzVuybM Kv0S3N5KwvidqHVPpJ2PoNWppSMc5ycAsJNrndiwcy9jPBe0s6j+FguuLC8zLrTyMKXpWMdVtJNHpd EbQ5FPI1gexBhRKA1XIEhBLLT7mea86QFhj26UUwCs0YqM7g5K5J+mo768tBxIJZ7jqvxKheKHrgNp h8PtpCWESdAVNgeruode6i42KCnY+/9pih+qZ1DU3FMvOlnXqTmhDKYBBOZHo4sSCHOa+7AU0EyBfb VNEfH4R33J+cJBqaLSTCkoQN1ktVA5XVsszmI+CSz7iKNEiSrlGGrk0MVb/rbcYUTf7KAGXdMmkdoJ Q4Q5Ert8gWY7Y28igHQldB6zXif6LGas55XtJcFSH05aU= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 Content-Transfer-Encoding: 8bit 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: # v4.14+ Fixes: 24d7c494ce46 ("efi/arm-stub: Round up FDT allocation to mapping size") Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/fdt.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/firmware/efi/libstub/fdt.c b/drivers/firmware/efi/libstub/fdt.c index fe567be0f118..804f542be3f2 100644 --- a/drivers/firmware/efi/libstub/fdt.c +++ b/drivers/firmware/efi/libstub/fdt.c @@ -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); -- 2.35.1