Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3977408ybv; Sun, 16 Feb 2020 10:25:19 -0800 (PST) X-Google-Smtp-Source: APXvYqwM64iZOByNyxpadx/EgjMwuHKNnwIPa59aujAhftSpNpBRQtFPKgIFw8/Som4V6NaBYkkH X-Received: by 2002:a9d:51ca:: with SMTP id d10mr9621222oth.76.1581877519828; Sun, 16 Feb 2020 10:25:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581877519; cv=none; d=google.com; s=arc-20160816; b=tiBu5n4qRzio2VRi/LUl8w8eGfPBVVwCUqkgsKRpTQHjXeQPfI5nWopmswsWZ8Dw67 ixxPMjMocsfh2HqmVdPe6rw5h2CX+0xi+X1oO6qBQkq/PFS2AoyEgPPErTiZ40UqV+3x WIJc929HmCRvluqbZxf9Cj1Lrn9aMHdEGzYdvTROPBgLeF09VmwT224fTiXluXlec90E 7xoQUdphjdpFtMqb5hE2jGYu7OpxLaiQ2rYw65wuVnSlpL6t0Pc1Q/LBc4c/wPwlYqo6 NMGn7XX+7NX69Ms/i4UZfPD6vXUYmIZtDN8ZVwIl1DWIUy6U+aZWrux3s09vaOkugb04 MXeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=4ebS6SB6+F2jFQB57MAoXtUac/Y2HEQVtJn+wqTWS2A=; b=woi4KrcOaZA0cIg5wRWi/Vqyq80N53zHzfKKnPlIHf7kU/SS1iJsTWUBwH9d/H+j1H FQUQxxAdXmKQzWqwtnGkbY/S0MjsqctyasC7trop4kflRX7EqTsk4J9X7H+Gb8RqpBCQ J2Pma30YgPbBwQtIn68XPH72uCP17nqvjJ7mUVaouTRsfx0AGjzKJ8JU2A4yLvXdIH5d yyBOp44+DsvwASsl8TILXQ4pvXIkCiSro4Je7sCbSaixrgCOjyyyOIRFoIuZefnzRqVV Ur6/5BhoNMZEx6QjhK2C6klhpUmpHKZCbRh9OZGiKPc3GN3nbL6Dy/Icg+odEzxoqV5X Stvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iqZ9Zlll; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si7729894ots.99.2020.02.16.10.25.08; Sun, 16 Feb 2020 10:25:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iqZ9Zlll; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727983AbgBPSYF (ORCPT + 99 others); Sun, 16 Feb 2020 13:24:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:33412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727915AbgBPSYC (ORCPT ); Sun, 16 Feb 2020 13:24:02 -0500 Received: from e123331-lin.home (amontpellier-657-1-18-247.w109-210.abo.wanadoo.fr [109.210.65.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5E2102086A; Sun, 16 Feb 2020 18:24:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581877441; bh=j3nSc1ziDeAOZ+GMaZJ73PIdlDUEWebRMtAgq39UXfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iqZ9ZlllVcZiNnNk8PL/flvephl9ku9KJYSiyBxqtBcQBrRodDzq86YSHV8aqPWWy O9mdOL0iIQU0P1EIkskzsJiFN+pro0ivbUT1nk6CimLwxyH720r+n+V/b0cWnnEo11 Z6i8sRHBC6mIlFObDNM47f+2QzWWhAbF37M0tmo8= From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , nivedita@alum.mit.edu, x86@kernel.org Subject: [PATCH 09/18] efi/ia64: use local variable for EFI system table address Date: Sun, 16 Feb 2020 19:23:25 +0100 Message-Id: <20200216182334.8121-10-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200216182334.8121-1-ardb@kernel.org> References: <20200216182334.8121-1-ardb@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The IA64 code never refers to the EFI system table except from inside the scope of efi_init(). So let's use a local variable instead of efi.systab, which will be going away soon. Signed-off-by: Ard Biesheuvel --- arch/ia64/kernel/efi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 74fad89ae209..81bc5031a115 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -484,6 +484,7 @@ efi_map_pal_code (void) void __init efi_init (void) { + const efi_system_table_t *efi_systab; void *efi_map_start, *efi_map_end; u64 efi_desc_size; char *cp; @@ -516,17 +517,17 @@ efi_init (void) printk(KERN_INFO "Ignoring memory above %lluMB\n", max_addr >> 20); - efi.systab = __va(ia64_boot_param->efi_systab); + efi_systab = __va(ia64_boot_param->efi_systab); /* * Verify the EFI Table */ - if (efi.systab == NULL) + if (efi_systab == NULL) panic("Whoa! Can't find EFI system table.\n"); - if (efi_systab_check_header(&efi.systab->hdr, 1)) + if (efi_systab_check_header(&efi_systab->hdr, 1)) panic("Whoa! EFI system table signature incorrect\n"); - efi_systab_report_header(&efi.systab->hdr, efi.systab->fw_vendor); + efi_systab_report_header(&efi_systab->hdr, efi_systab->fw_vendor); palo_phys = EFI_INVALID_TABLE_ADDR; @@ -536,7 +537,7 @@ efi_init (void) if (palo_phys != EFI_INVALID_TABLE_ADDR) handle_palo(palo_phys); - runtime = __va(efi.systab->runtime); + runtime = __va(efi_systab->runtime); efi.get_time = phys_get_time; efi.set_time = phys_set_time; efi.get_wakeup_time = phys_get_wakeup_time; -- 2.17.1