Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp599732ybz; Fri, 24 Apr 2020 06:10:13 -0700 (PDT) X-Google-Smtp-Source: APiQypKoHZuasebn9HwidAFSdG6EJX42lAyjbxjQaqGv/pakx75JbITejEOtiqypu4XIz9iXKlXG X-Received: by 2002:a05:6402:31b1:: with SMTP id dj17mr6798974edb.146.1587733812804; Fri, 24 Apr 2020 06:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587733812; cv=none; d=google.com; s=arc-20160816; b=n4t9IKWt2rhdsy2FYLPZa3VaXG1SQz8dpuUStu5CisYnh2+QUUbdVrckDx2t1gT3Ih FVE/4NctVJ58OUwbZ82dO9N4LIalohGwCwkpQBYMNJoCPk9i2cQja3So/8/KpF9edayR ddzPaYkMQT+p3G4wgcp4g6mUVg4OmATv+FIcNo+YKNyqpk12tVxthp9vs2TXTC72/+Xd YF74uVfZvWQKYrSPbO2LE9cEKg7++LwkGELYAEWOQJ4J71hT8wdN3rj1kz/C+xKF4MLc i+Fb6qhuGXFb01ROU9amSKWHKSKtN1bK4PQnThLXxldw1EoCt9vLfO3MPm3RXqGM8CTr kQAA== 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=HJHQUrQzxDjtpJgSeruKt31LJXKi15X4zK7l9bXewU4=; b=DCWxWeioQF2uZc3ViJ26TuklPhap1NbkTYWSvA44JJL6mICaN3FjDj+vhiDrGMgDH2 UbYKaqq/PGef7yHP7okaPef5WpjlfXr2KtKngR8gtFxEm6vtGn0lYI38gp+F3N/nrPUS xSsvf1h2DVunx8BVUHabx4kpVWLGeDSgMox4laCQ3QXlVaV5oee4h/2ChnW3rLrfenh4 zaCKSGJlGTSGlgEKrVZhL4MZ5fG2NC42cBFFDRMklMVdRrs8RTjrZNVSUGC+3rtyYd/M /lIM03c1es71ddWqHOyV/xTv7qTj3jhyQZJpiySsBtBxA+6Xwbj03wskxyQ6Dy+j7Gyo STZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=chPidlqy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j15si601822ejn.61.2020.04.24.06.09.44; Fri, 24 Apr 2020 06:10:12 -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; dkim=pass header.i=@kernel.org header.s=default header.b=chPidlqy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728295AbgDXNHR (ORCPT + 99 others); Fri, 24 Apr 2020 09:07:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:57932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728267AbgDXNHN (ORCPT ); Fri, 24 Apr 2020 09:07:13 -0400 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 2BA162087E; Fri, 24 Apr 2020 13:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587733632; bh=+6ZF5JZBWYW7C6szLyrrPqghgocxwmA+j6HDDjswy3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=chPidlqym1b2XUs2c7pzdyXQKv2u3VhxGsG4tPsfC9xiB+hSUnYMk2THjSSe3s6/J 8soNNDtGLjP6xbmFRbYJizvqNDBQCtY8wqp7LnpqRogvGbTZR+03fZgBkWJ4+SxxcO G9KdQKwL1CkQOACxWJXLhCDK4cdND9xEOAWXD6E4= From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Arvind Sankar , Atish Patra , Palmer Dabbelt , Zou Wei Subject: [PATCH 28/33] efi: Kill __efistub_global Date: Fri, 24 Apr 2020 15:05:26 +0200 Message-Id: <20200424130531.30518-29-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200424130531.30518-1-ardb@kernel.org> References: <20200424130531.30518-1-ardb@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arvind Sankar 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 Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20200416151227.3360778-4-nivedita@alum.mit.edu Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/efi-stub-helper.c | 15 +++++++-------- drivers/firmware/efi/libstub/efi-stub.c | 4 ++-- 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/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/efi-stub.c b/drivers/firmware/efi/libstub/efi-stub.c index 8a26cc11ca4a..8455c590c7b9 100644 --- a/drivers/firmware/efi/libstub/efi-stub.c +++ b/drivers/firmware/efi/libstub/efi-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/efistub.h b/drivers/firmware/efi/libstub/efistub.h index 5244eacc5d4b..9a87fff1d4ba 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 05ccb229fb45..1c3807d0c321 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.17.1