From patchwork Mon Feb 6 11:22:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 93410 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1661328qgi; Mon, 6 Feb 2017 03:25:06 -0800 (PST) X-Received: by 10.98.157.83 with SMTP id i80mr12378395pfd.177.1486380306033; Mon, 06 Feb 2017 03:25:06 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si398850pgg.234.2017.02.06.03.25.05; Mon, 06 Feb 2017 03:25:06 -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=@linaro.org; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751936AbdBFLZE (ORCPT + 25 others); Mon, 6 Feb 2017 06:25:04 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35410 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751714AbdBFLXm (ORCPT ); Mon, 6 Feb 2017 06:23:42 -0500 Received: by mail-wm0-f42.google.com with SMTP id b65so115686421wmf.0 for ; Mon, 06 Feb 2017 03:23:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zm7ySq0FVgwTpKe4KKtJ5+ZlWMQXqVdxQhqRQdk5qcU=; b=SpXnZJENDZF6Ooc8+0tdXtvL2b9dJ9Q0xLZnazX6L+jmJFGIY1NZFiMmZns59lVi1q pJyoROsIq2dDppRM/ASjNcHA2AYWs9CyDe9T54m9Yq0QTMgBJJ+m/BB73cRzoxn29Mh6 kj4KidF7ktQqjMSTeU5B0NzIpuOEs5VXN7EAc= 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; bh=zm7ySq0FVgwTpKe4KKtJ5+ZlWMQXqVdxQhqRQdk5qcU=; b=e6E8/1FAq2ZtQ4LLAXaPqzeXOV26KrRrOGkcxFdBSeqpU+QcuQ5jkDITliEfcLlw+5 0CC97Al1Ut/2jaXgI+5/QmiizXThjeO2/wvz0JxSpeCdP0H5CjMOlFkAqAzG2lILLxOX gz2Oc+WVfXkC2X2nozo6gjofBo1JM/eCvQaBAOxKJPT8kYEwjzwjHqg/Iv5FUSYpqlsv E/yQi6T/qoDqRH81/scq76tZR4MVK3azcrA+YbFdMigfUu5zAzJ9hXvAZ/N5T3qt3Ne3 jrUgDTIAdwe1bO3xGw3lx+MfwVxgrDaJUb2Q0eUkmpgFpRalrt1P56cy7zE9jsDLc+fx ik9A== X-Gm-Message-State: AMke39ko9vV9FM5FYkpF6xkLCvAg2+p6C8fUTr7Q2YBVEtSxVszJ+p3rpy2Z7ipgg2oGFmRx X-Received: by 10.28.13.16 with SMTP id 16mr7838667wmn.101.1486380221145; Mon, 06 Feb 2017 03:23:41 -0800 (PST) Received: from localhost.localdomain ([160.169.163.122]) by smtp.gmail.com with ESMTPSA id o70sm903698wrc.20.2017.02.06.03.23.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Feb 2017 03:23:40 -0800 (PST) From: Ard Biesheuvel To: matt@codeblueprint.co.uk, Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: David Howells , Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org Subject: [PATCH 2/7] arm/efi: Allow invocation of arbitrary runtime services Date: Mon, 6 Feb 2017 11:22:41 +0000 Message-Id: <1486380166-31868-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486380166-31868-1-git-send-email-ard.biesheuvel@linaro.org> References: <1486380166-31868-1-git-send-email-ard.biesheuvel@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Howells efi_call_runtime() is provided for x86 to be able abstract mixed mode support. Provide this for ARM also so that common code work in mixed mode also. Suggested-by: Lukas Wunner Cc: Matt Fleming Signed-off-by: David Howells Signed-off-by: Ard Biesheuvel --- arch/arm/include/asm/efi.h | 1 + arch/arm64/include/asm/efi.h | 1 + 2 files changed, 2 insertions(+) -- 2.7.4 diff --git a/arch/arm/include/asm/efi.h b/arch/arm/include/asm/efi.h index 0b06f5341b45..e4e6a9d6a825 100644 --- a/arch/arm/include/asm/efi.h +++ b/arch/arm/include/asm/efi.h @@ -55,6 +55,7 @@ void efi_virtmap_unload(void); #define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) #define __efi_call_early(f, ...) f(__VA_ARGS__) +#define efi_call_runtime(f, ...) sys_table_arg->runtime->f(__VA_ARGS__) #define efi_is_64bit() (false) #define efi_call_proto(protocol, f, instance, ...) \ diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h index 0b6b1633017f..e7445281e534 100644 --- a/arch/arm64/include/asm/efi.h +++ b/arch/arm64/include/asm/efi.h @@ -50,6 +50,7 @@ int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md); #define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) #define __efi_call_early(f, ...) f(__VA_ARGS__) +#define efi_call_runtime(f, ...) sys_table_arg->runtime->f(__VA_ARGS__) #define efi_is_64bit() (true) #define efi_call_proto(protocol, f, instance, ...) \