From patchwork Wed Oct 19 08:24:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp212507wrs; Wed, 19 Oct 2022 02:07:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Ko4kQkebhEmoPNz3QlHEkjhqWwguk4XEx+NwOSLDNuTWf/KIdWlOBaNrCGGlEuqZReraS X-Received: by 2002:aa7:d848:0:b0:458:9ccc:f605 with SMTP id f8-20020aa7d848000000b004589cccf605mr6520704eds.68.1666170460494; Wed, 19 Oct 2022 02:07:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170460; cv=none; d=google.com; s=arc-20160816; b=dajR0uSqbGyBozNiUdTRACY8HgVG66wht1MJJwCgBsZ620EUjL638un1bLAH4YgXSX U7XIDec3Up9vkdUnh4M4Dle04cVsgNDOYv6L5dsA41G4wsjN5qCaxY+HKezv7PHi/CjM rRoVSTP80ayLOeD2vywiE8pqW3q0QDiUlRNaaMKflAM3ZLe6M6QnDONYKXk7lAxkQQlP RmhJqd5ZVr57xUYX5TmT7hhItKZyqQdhWdy7woXbsFi/hiZFY2z54BKIMbPmPZjHGtbR V5tJR18LRCV2pwF4oarO8NzeCWy35O2uebLVwo+BJ37Q2nuC39odAAsBQek448VJqpai 2EZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s2gKcQ/IDsP1dabzlcd7EszbvivbP0MKCvj4h22jt40=; b=VJk54tEgkhBO8EKdA8fwgwbRvtYzSGYqn9mzZfoi0fdSIEtXdKr3nBfLpjhziFDm9z 3d5Q/7Z2yB+hSeLY1uR1LQqw0RVwejOZHKlpOdbJQB9S0emYL8eluylVdcWw4YXCUOFt E5/H4wSwn2YvX/aEXTTBw/pw4PkAKtLfqk2nf+BqnqD7g6J+W6RX2gei2C3E4PyCx+HZ s9LKf2YjWSSlohJYRiKGZNlwBoKPfI1KPnIpWIYYjFzVjXXfydcSc7HHqR2PYzJ1G1GY D7C2JU708CsBklp29X7ydrd/C25C53WFbFvY8jRLB2DHZMhPtrlJuVmKkgCjeiaKa5DO V5Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=07tpGFe2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw5-20020a1709066a0500b00780a240cfd7si14019416ejc.493.2022.10.19.02.07.10; Wed, 19 Oct 2022 02:07:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=07tpGFe2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232067AbiJSJAY (ORCPT + 99 others); Wed, 19 Oct 2022 05:00:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232021AbiJSI6k (ORCPT ); Wed, 19 Oct 2022 04:58:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 153659F74F; Wed, 19 Oct 2022 01:53:53 -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 dfw.source.kernel.org (Postfix) with ESMTPS id DA1CB61802; Wed, 19 Oct 2022 08:45:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6A2DC433C1; Wed, 19 Oct 2022 08:45:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169128; bh=nFCeWBlb71nzHFatGST1sfWN1nDJByc2HnNY5OXQHfM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=07tpGFe20hPORzdq9D+fBgsK5aaEVYefOAz6m6nVwAPurmYp0rupY4sykNimn4OLG elB4nC9oX+hH6nMbbrC8Qyco6Vu/qr9uNriVmjSHU5dP3NbXRW5XMOPzJMNJmCpMuS nVgQEpu0SksbTBcJDnPSq8b8OC+MK6DCXZeCajao= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel Subject: [PATCH 6.0 168/862] efi: libstub: drop pointless get_memory_map() call Date: Wed, 19 Oct 2022 10:24:15 +0200 Message-Id: <20221019083257.389965292@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106356723479059?= X-GMAIL-MSGID: =?utf-8?q?1747106356723479059?= 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 @@ -280,14 +280,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(&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);