From patchwork Mon Oct 24 11:32:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8984 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp439151wru; Mon, 24 Oct 2022 06:02:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM43BhsI46ciK/kzykf0AgHyG8CKr7awUvKtmNzQaWfdhG5qFZSbcLEhs9a/hGGqdVbQg1/U X-Received: by 2002:a63:2061:0:b0:46e:d84b:719f with SMTP id r33-20020a632061000000b0046ed84b719fmr10928848pgm.169.1666616538228; Mon, 24 Oct 2022 06:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666616538; cv=none; d=google.com; s=arc-20160816; b=stYf5ZmHtJjEiOfAOqDo3n3QDps04HrLu7+//k6pKEJensWVttb+qKj+ur8uc0EO2w N1tAqv+PRCCYf2gv1Qr26d6hXr07W1rgre/przAJF/xAM+pSFs0JCj6/7X3LOn8/IPut 4pv/YFhXijB2KAMI4asMJDvSzrdRL37Dx+rfklXd82SZapQJ+g86lx1/Qi0y0EGeFvwp HOJgKzH2h4WxE+jPsx4tl9Q20jLmaUXNFumuFPbnmyrQGMmDY6drXEk0OW8avB5geBqN 2FL2cuNrckHJrwlyG9rK+IoCswdoUqB3e7i7r9w1Xi/vRUyeKoM0hIR90n02EPsdFs05 7/5g== 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=kEwL4o3NqrO09nxBfT1xEHO+A701WlFlAvf9elUGWFM=; b=D/A+3tHt+8l9Ijt6d2fYF2/M1P5QqZaahBShaYYbmoaYcB2NvA74Hj/nflX8BDGJQ9 2a52AuIshbdfE235y3RbcOuz+gyLzihNj8oeaRRPFE8h/+VpB+uN7ZIrCozNiuAkpzqZ lOdys0PP7N3yVl1IG9TodIRQG79ZZBAPqU/IxHRvU5oyMbV2R7lG4GtK6dFcYXSmNSPi WbvFE5GmhFaq1NEuuyRTndpttjamDhSxWNIA9IOJXYeLXQ9Gr3/artbNAW+hSXHqNF99 5/xQhabWm33eBOYCxeZaBN2++aw5MZ0VJIyIHUYZBzh0m/adn4btd/vK+qGadm0AzXP5 e5Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YRN1Tqoo; 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 bd12-20020a656e0c000000b0043ce4eee5f2si35765417pgb.433.2022.10.24.06.01.45; Mon, 24 Oct 2022 06:02:18 -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=YRN1Tqoo; 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 S235036AbiJXNBH (ORCPT + 99 others); Mon, 24 Oct 2022 09:01:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234946AbiJXM7A (ORCPT ); Mon, 24 Oct 2022 08:59:00 -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 2A3EC80F64; Mon, 24 Oct 2022 05:17:57 -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 B8BBD6132D; Mon, 24 Oct 2022 12:16:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C756EC433C1; Mon, 24 Oct 2022 12:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613763; bh=zftqSdqfvE2rZqRBOmyDFukm7cI5x5ZeXi9nAfOkjDs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YRN1TqooAlCTC3Dlzx0m7+ljJf+XHhBhITe+NghdEzUniAOp/vWK7NCISiylvesAV vegFYimDm0wlIcRKqgBiiPJfU1WgN0TJExYiCIJWSVfnLorsojv5QDO22h7RxKxQQ1 eyX5VuMHdQd+Emg3rPSI9lwv5a2mKuTBIn+8UhFg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel Subject: [PATCH 5.4 253/255] efi: libstub: drop pointless get_memory_map() call Date: Mon, 24 Oct 2022 13:32:43 +0200 Message-Id: <20221024113011.731732511@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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?1747574103336801302?= X-GMAIL-MSGID: =?utf-8?q?1747574103336801302?= 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 @@ -291,14 +291,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);