From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5D48ECAAA1 for ; Mon, 24 Oct 2022 12:21:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233382AbiJXMVZ (ORCPT ); Mon, 24 Oct 2022 08:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233470AbiJXMTk (ORCPT ); Mon, 24 Oct 2022 08:19:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A4C482D3E; Mon, 24 Oct 2022 04:58:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E3B4DB811C5; Mon, 24 Oct 2022 11:54:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4745CC433D6; Mon, 24 Oct 2022 11:54:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612462; bh=/GUBL19Jp9NmcH/HaL4btiEfO1T1Pkk6YALZLRd1jc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lbpZ6n4RhcqCfjkWZAtn73ZM2sTC+HVgsztIbDIs5801E/Iog1IUuD+Y0yGwF8Tvx S7Tle1zSLIroqe/agDKbIR4SiQNVW9mKfoCCjFnQPkmP2RjM+8P12z/s1iNWgEFJnM Tg+C0Sx8Y9oF2YSOJ3pVc1oV5IbD6F7GuyR4Ugbs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel Subject: [PATCH 4.14 208/210] efi: libstub: drop pointless get_memory_map() call Date: Mon, 24 Oct 2022 13:32:05 +0200 Message-Id: <20221024113003.766339614@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: 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: # v4.14+ Fixes: 24d7c494ce46 ("efi/arm-stub: Round up FDT allocation to mapping size") Signed-off-by: Ard Biesheuvel Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/efi/libstub/fdt.c | 8 -------- 1 file changed, 8 deletions(-) --- a/drivers/firmware/efi/libstub/fdt.c +++ b/drivers/firmware/efi/libstub/fdt.c @@ -301,14 +301,6 @@ efi_status_t allocate_new_fdt_and_exit_b 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);