Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp753124ybz; Wed, 15 Apr 2020 18:12:16 -0700 (PDT) X-Google-Smtp-Source: APiQypLIJHYquP9Z3zI272He4xkvplldritAXyyXdKBWXEdpt+273rpBndORPwUUGauEMNh+UVil X-Received: by 2002:a17:906:dc02:: with SMTP id yy2mr526579ejb.11.1586999536017; Wed, 15 Apr 2020 18:12:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586999536; cv=none; d=google.com; s=arc-20160816; b=fzWf71hrzFErn1Mvx0c1WcHAvBdb0ZVaR3CyPeYtjBU+BYTCLS0koPx+A8mvaNVKcu rMwBpfWpH9XXrrxdgsR2JUp0OMsBbb5Oe8AjE70IM30E4Az1LYi+SNVSJsz45DEIR3ME W25ywMvvHC9aSNJQNQtTt2m/gNHQ1GsD4MpkhPO47MV5dcsGFbEIanb9/oG6nzbH8BUL Q5aQX035UEupoCZtX4gLxBxah8A6yYujTo+8ozhnPDx+clV+xD1p/1X6AwQFsmNzYemx gVIV/RkQ7XjEMA4cmtIQh77JOcyaHicDgzgeyz9tn+CkljqZ3K/qDMOPGPec/clqQoT+ caVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=adNtgtRMt64ieUnhMqRLF0a2CXsdZP572pPfrSALC+A=; b=gMimF4hGNIn776Q+bDfUTtzXr71YxUcyoNq+S0e0mjCVfDTFLBPx3+5t0r+2hj1PS7 9WlUCtpeddjIPSnTF44ZNPcxJayTVKTqZakJFQn+bh1VINYLeoiwgGrNDWvkCmen3rlZ TMZrKc/0Z73QtmTIneSTwavNOO/wBdMYhCU7SYTSXfaPiUR2wfxvBRzVG5lm6z227Lv9 88FsBFh7JyY7gblok8JeFo58k8ujL3yr+I52ns2gkZ0f0seT190UkXytmToxyBueZRpU 4hnkC4FVzxXAay2SjSia5SlyKEh1j81KbUuVBQFUMWbXaZPGigc+wP7uvOcCIXjTvYKJ 4Fvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si4792530edq.344.2020.04.15.18.11.51; Wed, 15 Apr 2020 18:12:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731661AbgDOWQV (ORCPT + 99 others); Wed, 15 Apr 2020 18:16:21 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:43799 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731098AbgDOWP0 (ORCPT ); Wed, 15 Apr 2020 18:15:26 -0400 Received: by mail-qt1-f196.google.com with SMTP id z90so14815774qtd.10; Wed, 15 Apr 2020 15:15:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=adNtgtRMt64ieUnhMqRLF0a2CXsdZP572pPfrSALC+A=; b=UvkXnONCUl768unE2FEP2e8w4sMPqv2F0qZ4BO/hwfi/QHWb/DR42/rT8HtIO8HcmF mZ0ZkS4FDDhbQXt94SijCskTVbtpRnS+Z3Fihub5gUaaQjV8KNxKPToLJM1NBDQDb/Jb MvFtH9mTEJ140J3PzjcznQzIxHDCp7ZmttG/btQBa6ydzVTozTM5cxCUwn6gJTKbWN99 bEPR8cVpnJThFGY35bFPyMHL+eFttpFOplsJHX3mi5FdbHgPJPrOLdTlD4/zvEVkCUTi 9wvGHqEYBJWs2WeS3fJWlUPd6O+PxRzQh+IrgH0YOBA6po3Im1pPs7QO2Ud80PgVXeJF T30w== X-Gm-Message-State: AGi0PuaUAsn6a/cOIkLZOrvRFahwEPAH0DdAteL4XxMrW3RcDEW7aC/F kHNNGh+vvDhC6Ro0eBuRZ7A= X-Received: by 2002:ac8:71d8:: with SMTP id i24mr20622652qtp.223.1586988925102; Wed, 15 Apr 2020 15:15:25 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id i20sm13264340qkl.135.2020.04.15.15.15.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 15:15:24 -0700 (PDT) From: Arvind Sankar To: Ard Biesheuvel Cc: linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org Subject: [PATCH 4/5] efi: Kill __efistub_global Date: Wed, 15 Apr 2020 18:15:19 -0400 Message-Id: <20200415221520.2692512-5-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200415221520.2692512-1-nivedita@alum.mit.edu> References: <20200415221520.2692512-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that both arm and x86 are using the linker script to place the EFI stub's global variables in the correct section, remove __efistub_global. Signed-off-by: Arvind Sankar --- drivers/firmware/efi/libstub/arm-stub.c | 4 ++-- drivers/firmware/efi/libstub/efi-stub-helper.c | 15 +++++++-------- drivers/firmware/efi/libstub/efistub.h | 2 -- drivers/firmware/efi/libstub/gop.c | 2 +- drivers/firmware/efi/libstub/x86-stub.c | 2 +- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c index 99a5cde7c2d8..bf42d6c742a8 100644 --- a/drivers/firmware/efi/libstub/arm-stub.c +++ b/drivers/firmware/efi/libstub/arm-stub.c @@ -36,9 +36,9 @@ #endif static u64 virtmap_base = EFI_RT_VIRTUAL_BASE; -static bool __efistub_global flat_va_mapping; +static bool flat_va_mapping; -static efi_system_table_t *__efistub_global sys_table; +static efi_system_table_t *sys_table; __pure efi_system_table_t *efi_system_table(void) { diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c index c6092b6038cf..14e56a64f208 100644 --- a/drivers/firmware/efi/libstub/efi-stub-helper.c +++ b/drivers/firmware/efi/libstub/efi-stub-helper.c @@ -12,14 +12,13 @@ #include "efistub.h" -static bool __efistub_global efi_nochunk; -static bool __efistub_global efi_nokaslr; -static bool __efistub_global efi_noinitrd; -static bool __efistub_global efi_quiet; -static bool __efistub_global efi_novamap; -static bool __efistub_global efi_nosoftreserve; -static bool __efistub_global efi_disable_pci_dma = - IS_ENABLED(CONFIG_EFI_DISABLE_PCI_DMA); +static bool efi_nochunk; +static bool efi_nokaslr; +static bool efi_noinitrd; +static bool efi_quiet; +static bool efi_novamap; +static bool efi_nosoftreserve; +static bool efi_disable_pci_dma = IS_ENABLED(CONFIG_EFI_DISABLE_PCI_DMA); bool __pure nochunk(void) { diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h index 49651e20bb9f..f96c56596034 100644 --- a/drivers/firmware/efi/libstub/efistub.h +++ b/drivers/firmware/efi/libstub/efistub.h @@ -25,8 +25,6 @@ #define EFI_ALLOC_ALIGN EFI_PAGE_SIZE #endif -#define __efistub_global - extern bool __pure nochunk(void); extern bool __pure nokaslr(void); extern bool __pure noinitrd(void); diff --git a/drivers/firmware/efi/libstub/gop.c b/drivers/firmware/efi/libstub/gop.c index fa05a0b0adfd..216327d0b034 100644 --- a/drivers/firmware/efi/libstub/gop.c +++ b/drivers/firmware/efi/libstub/gop.c @@ -32,7 +32,7 @@ static struct { u8 depth; } res; }; -} cmdline __efistub_global = { .option = EFI_CMDLINE_NONE }; +} cmdline = { .option = EFI_CMDLINE_NONE }; static bool parse_modenum(char *option, char **next) { diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c index 7583e908852f..aedac3af4b5c 100644 --- a/drivers/firmware/efi/libstub/x86-stub.c +++ b/drivers/firmware/efi/libstub/x86-stub.c @@ -20,7 +20,7 @@ /* Maximum physical address for 64-bit kernel with 4-level paging */ #define MAXMEM_X86_64_4LEVEL (1ull << 46) -static efi_system_table_t *sys_table __efistub_global; +static efi_system_table_t *sys_table; extern const bool efi_is64; extern u32 image_offset; -- 2.24.1