From patchwork Tue Jan 14 17:41:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 23202 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 534C720555 for ; Tue, 14 Jan 2014 17:41:56 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id i7sf3480294oag.1 for ; Tue, 14 Jan 2014 09:41:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=06vGwJ9TsZHNa5BItaehpAIO6qKJWiBBD8g7Fns6mxU=; b=HyqZouHm1WdTPtmg7JUf/2bCMxx2b5oj/VcVW6FhcenkQdRId3Lh/KxBRtwx3Lnmzz flnLANhIJ7/lYwMlWnC3lDVtvdz97P0xQ4IREF0Bh18mrwcg3BKBzCV/2T/jRkKGwZoR RIUMTyixpeuYVC9C87Qtv/4cXSBp54qxRD1BUhyo+HZJci3x5K+VXJvGhhHLj+8C7Uya AtInhYhe9jj80zOKPtk8xZNEPjlOiRWuhHiXyX0F/m9Kk5nlHwXM4B1etKi0HhNJSxIt BcGdOBtFZWdMStD3yUM5vEgHNqbb2+bsXUHZVLV/KJMksrGG+ICITHIx1B89i/b5l7zU I5zw== X-Gm-Message-State: ALoCoQknbPxhOsX87mdttuTle/eFEPFMWZrVhMrwffvAS6WCp5M0zc8vAT8leIm10UJ8MTfTynS6 X-Received: by 10.182.118.194 with SMTP id ko2mr1005419obb.32.1389721315464; Tue, 14 Jan 2014 09:41:55 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.76.72 with SMTP id i8ls235634qew.59.gmail; Tue, 14 Jan 2014 09:41:55 -0800 (PST) X-Received: by 10.221.20.199 with SMTP id qp7mr1391038vcb.24.1389721315343; Tue, 14 Jan 2014 09:41:55 -0800 (PST) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id w5si488108vcl.141.2014.01.14.09.41.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Jan 2014 09:41:55 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id ie18so401672vcb.12 for ; Tue, 14 Jan 2014 09:41:55 -0800 (PST) X-Received: by 10.221.20.199 with SMTP id qp7mr1391035vcb.24.1389721315278; Tue, 14 Jan 2014 09:41:55 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp218537ved; Tue, 14 Jan 2014 09:41:54 -0800 (PST) X-Received: by 10.194.175.133 with SMTP id ca5mr28986542wjc.19.1389721313346; Tue, 14 Jan 2014 09:41:53 -0800 (PST) Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by mx.google.com with ESMTPS id kd7si998303wjc.85.2014.01.14.09.41.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Jan 2014 09:41:53 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.176 is neither permitted nor denied by best guess record for domain of leif.lindholm@linaro.org) client-ip=74.125.82.176; Received: by mail-we0-f176.google.com with SMTP id q58so728635wes.35 for ; Tue, 14 Jan 2014 09:41:52 -0800 (PST) X-Received: by 10.180.20.100 with SMTP id m4mr21731048wie.32.1389721312799; Tue, 14 Jan 2014 09:41:52 -0800 (PST) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id q5sm2519457wia.2.2014.01.14.09.41.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jan 2014 09:41:52 -0800 (PST) From: Leif Lindholm To: linux-efi@vger.kernel.org Cc: patches@linaro.org, Leif Lindholm Subject: [PATCH] efi: x86: make "efi facility" use slightly more generic Date: Tue, 14 Jan 2014 17:41:25 +0000 Message-Id: <1389721285-32390-1-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Currently, efi_enabled() is defined to be a dummy macro always returning 1 unless CONFIG_X86. Change this logic to use a CONFIG_ARCH_USES_EFI_FACILITY to enable use by other architectures. Signed-off-by: Leif Lindholm --- arch/x86/Kconfig | 1 + drivers/firmware/efi/Kconfig | 3 +++ include/linux/efi.h | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 50e1eab..8c0520d 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1582,6 +1582,7 @@ config EFI bool "EFI runtime service support" depends on ACPI select UCS2_STRING + select ARCH_USES_EFI_FACILITY ---help--- This enables the kernel to use EFI runtime services that are available (such as the EFI variable services). diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig index 6aecbc8..1053c8f 100644 --- a/drivers/firmware/efi/Kconfig +++ b/drivers/firmware/efi/Kconfig @@ -40,3 +40,6 @@ endmenu config UEFI_CPER bool + +config ARCH_USES_EFI_FACILITY + bool diff --git a/include/linux/efi.h b/include/linux/efi.h index 11ce678..b74c8a5 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -655,7 +655,7 @@ extern int __init efi_setup_pcdp_console(char *); #define EFI_64BIT 5 /* Is the firmware 64-bit? */ #ifdef CONFIG_EFI -# ifdef CONFIG_X86 +# ifdef CONFIG_ARCH_USES_EFI_FACILITY extern int efi_enabled(int facility); # else static inline int efi_enabled(int facility)