From patchwork Mon Apr 25 20:06:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Fleming X-Patchwork-Id: 66606 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1232775qge; Mon, 25 Apr 2016 13:07:26 -0700 (PDT) X-Received: by 10.66.236.232 with SMTP id ux8mr51718823pac.145.1461614845995; Mon, 25 Apr 2016 13:07:25 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 18si8312407pfh.24.2016.04.25.13.07.25; Mon, 25 Apr 2016 13:07:25 -0700 (PDT) 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=@codeblueprint-co-uk.20150623.gappssmtp.com; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964883AbcDYUHW (ORCPT + 29 others); Mon, 25 Apr 2016 16:07:22 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:36839 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964782AbcDYUHQ (ORCPT ); Mon, 25 Apr 2016 16:07:16 -0400 Received: by mail-wm0-f49.google.com with SMTP id v188so111819498wme.1 for ; Mon, 25 Apr 2016 13:07:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeblueprint-co-uk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2FJVRGdicoz3/fWeOv4mW8l0kBpcCaaBc+hOx9teE5w=; b=tp+AXyHU11df6cF8hWjDVmfhjWG27BH0d/k3xj9TsJsUA8pO+DsKET86xej/Gi87Jr IsknQ0kZtCRMQFbE/3Ai+ftX3hS6VkSEvc3MuhBDuC4WccZtkWAdddT+qVoNgoNM1d01 1IwsLRlx4wlPdkSj6wBOpOhmnLcpVCJvQ1Fzl3vdwZX5NguzMVxDK+vvCViO+r3uEyPx zyYiFEQRovsyRC22xo2SD6UedDVs2Y7PdDEkstWXTEUP/iFFDSqgqYLRKm+JjnAODBry Sq+Y4bAqVhiyL9mrgOUDjtiKnOZsgk5Hr19KRNMDEKn1xHy2r40Flg+h0vlawCy+Df9a hGqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2FJVRGdicoz3/fWeOv4mW8l0kBpcCaaBc+hOx9teE5w=; b=BaCQXNgunrwlcvobTPZJ84yytNSERwBqVycnsxGiVzJZVNH4mqILp43t6Yj1GEtDnW 9h3U3tHC4iVZlP2s2tjWXGBXS80285XOdcOJK0KKIWwJpcPHg17U4KLjaQkRWHY7SX38 R0FwLHjXahzKQ5ZLdNCsrIXN03Kw8HtnXanBmSEBqoS6NzKpkQ/tSYss5v0gwqTzGuG+ ukkWAznIVVVXK2AqxvEz5HPXKOxhVLO7ummkwJ6PsCOtuatnH3yBFs3+PAfMjNysopnb XyvUI7qZXjbgLz9rKiiENvP1DIPGo2c2ur0SJG/a3DGe4Fh2fHSHZuMkCjAMXIZhLnvT a5VQ== X-Gm-Message-State: AOPr4FUT66YkUs6RgNrxTrVQbe6PSFaCxzPWfx4xt0UA2DGb/F2sn95uhpLJ7Lhf8l8J5g== X-Received: by 10.28.232.1 with SMTP id f1mr2204510wmh.6.1461614835262; Mon, 25 Apr 2016 13:07:15 -0700 (PDT) Received: from localhost (bcdc58e5.skybroadband.com. [188.220.88.229]) by smtp.gmail.com with ESMTPSA id o4sm14310528wjx.45.2016.04.25.13.07.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Apr 2016 13:07:14 -0700 (PDT) From: Matt Fleming To: Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Matt Fleming , Leif Lindholm , "Luck, Tony" , Mark Rutland Subject: [PATCH 01/40] efi: Get rid of EFI_SYSTEM_TABLES status bit Date: Mon, 25 Apr 2016 21:06:33 +0100 Message-Id: <1461614832-17633-2-git-send-email-matt@codeblueprint.co.uk> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1461614832-17633-1-git-send-email-matt@codeblueprint.co.uk> References: <1461614832-17633-1-git-send-email-matt@codeblueprint.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ard Biesheuvel The EFI_SYSTEM_TABLES status bit is set by all EFI supporting architectures upon discovery of the EFI system table, but the bit is never tested in any code we have in the tree. So remove it. Signed-off-by: Ard Biesheuvel Cc: Mark Rutland Cc: Leif Lindholm Cc: "Luck, Tony" Signed-off-by: Matt Fleming --- arch/ia64/kernel/efi.c | 2 -- arch/x86/platform/efi/efi.c | 2 -- drivers/firmware/efi/arm-runtime.c | 1 - include/linux/efi.h | 1 - 4 files changed, 6 deletions(-) -- 2.7.3 diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 300dac3702f1..bf0865cd438a 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -531,8 +531,6 @@ efi_init (void) efi.systab->hdr.revision >> 16, efi.systab->hdr.revision & 0xffff, vendor); - set_bit(EFI_SYSTEM_TABLES, &efi.flags); - palo_phys = EFI_INVALID_TABLE_ADDR; if (efi_config_init(arch_tables) != 0) diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 994a7df84a7b..df393eab0e50 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@ -352,8 +352,6 @@ static int __init efi_systab_init(void *phys) efi.systab->hdr.revision >> 16, efi.systab->hdr.revision & 0xffff); - set_bit(EFI_SYSTEM_TABLES, &efi.flags); - return 0; } diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c index 6ae21e41a429..16c7d2a71156 100644 --- a/drivers/firmware/efi/arm-runtime.c +++ b/drivers/firmware/efi/arm-runtime.c @@ -105,7 +105,6 @@ static int __init arm_enable_runtime_services(void) pr_err("Failed to remap EFI System Table\n"); return -ENOMEM; } - set_bit(EFI_SYSTEM_TABLES, &efi.flags); if (!efi_virtmap_init()) { pr_err("No UEFI virtual mapping was installed -- runtime services will not be available\n"); diff --git a/include/linux/efi.h b/include/linux/efi.h index 1626474567ac..1545098b0565 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -1000,7 +1000,6 @@ extern int __init efi_setup_pcdp_console(char *); * possible, remove EFI-related code altogether. */ #define EFI_BOOT 0 /* Were we booted from EFI? */ -#define EFI_SYSTEM_TABLES 1 /* Can we use EFI system tables? */ #define EFI_CONFIG_TABLES 2 /* Can we use EFI config tables? */ #define EFI_RUNTIME_SERVICES 3 /* Can we use runtime services? */ #define EFI_MEMMAP 4 /* Can we use EFI memory map? */