From: Mark Rutland <mark.rutland@arm.com>
To: linux-efi@vger.kernel.org
Cc: mark.rutland@arm.com, linux@arm.linux.org.uk,
ard.biesheuvel@linaro.org, matt@codeblueprint.co.uk,
catalin.marinas@arm.com, will.deacon@arm.com,
linux-kernel@vger.kernel.org, leif.lindholm@linaro.org,
mingo@redhat.com, hpa@zytor.com, tglx@linutronix.de,
linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 2/6] arm64/efi: move to generic {__,}efi_call_virt
Date: Fri, 22 Apr 2016 14:51:19 +0100 [thread overview]
Message-ID: <1461333083-15529-3-git-send-email-mark.rutland@arm.com> (raw)
In-Reply-To: <1461333083-15529-1-git-send-email-mark.rutland@arm.com>
Now there's a common template for {__,}efi_call_virt, remove the
duplicate logic from the arm64 efi code.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-efi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
arch/arm64/include/asm/efi.h | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h
index 8e88a69..f4f71224 100644
--- a/arch/arm64/include/asm/efi.h
+++ b/arch/arm64/include/asm/efi.h
@@ -14,28 +14,21 @@ extern void efi_init(void);
int efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md);
-#define efi_call_virt(f, ...) \
+#define arch_efi_call_virt_setup() \
({ \
- efi_##f##_t *__f; \
- efi_status_t __s; \
- \
kernel_neon_begin(); \
efi_virtmap_load(); \
- __f = efi.systab->runtime->f; \
- __s = __f(__VA_ARGS__); \
- efi_virtmap_unload(); \
- kernel_neon_end(); \
- __s; \
})
-#define __efi_call_virt(f, ...) \
+#define arch_efi_call_virt(f, args...) \
({ \
efi_##f##_t *__f; \
- \
- kernel_neon_begin(); \
- efi_virtmap_load(); \
__f = efi.systab->runtime->f; \
- __f(__VA_ARGS__); \
+ __f(args); \
+})
+
+#define arch_efi_call_virt_teardown() \
+({ \
efi_virtmap_unload(); \
kernel_neon_end(); \
})
--
1.9.1
next prev parent reply other threads:[~2016-04-22 13:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-22 13:51 [PATCHv2 0/6] efi: detect erroneous firmware IRQ manipulation Mark Rutland
2016-04-22 13:51 ` [PATCHv2 1/6] efi/runtime-wrappers: add {__,}efi_call_virt templates Mark Rutland
2016-04-24 21:12 ` Matt Fleming
2016-04-22 13:51 ` Mark Rutland [this message]
2016-04-22 13:51 ` [PATCHv2 3/6] arm/efi: move to generic {__,}efi_call_virt Mark Rutland
2016-04-22 13:51 ` [PATCHv2 4/6] x86/efi: " Mark Rutland
2016-04-22 13:51 ` [PATCHv2 5/6] efi/runtime-wrappers: remove redundant ifdefs Mark Rutland
2016-04-22 13:51 ` [PATCHv2 6/6] efi/runtime-wrappers: detect FW irq flag corruption Mark Rutland
[not found] ` <1461333083-15529-7-git-send-email-mark.rutland-5wv7dgnIgG8@public.gmane.org>
2016-04-24 21:17 ` Matt Fleming
[not found] ` <1461333083-15529-1-git-send-email-mark.rutland-5wv7dgnIgG8@public.gmane.org>
2016-04-22 14:12 ` [PATCHv2 0/6] efi: detect erroneous firmware IRQ manipulation Ard Biesheuvel
[not found] ` <CAKv+Gu8FGpZK4yDito2jKTbjuyE2jojj5tZhCa2qUwKdWL9+ng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-24 21:22 ` Matt Fleming
[not found] ` <20160424212241.GO2829-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-04-25 10:15 ` Matt Fleming
[not found] ` <20160425101527.GP2829-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-04-25 10:21 ` Ard Biesheuvel
[not found] ` <CAKv+Gu8OfqdJp-VhC3o-tie4mRZXsF5ESKkZbsjnBHDY4xbXvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-25 10:28 ` Matt Fleming
[not found] ` <20160425102821.GQ2829-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-04-25 10:40 ` Mark Rutland
2016-04-25 10:51 ` Matt Fleming
[not found] ` <20160425105153.GR2829-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-04-25 11:04 ` Mark Rutland
2016-04-25 11:19 ` Matt Fleming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461333083-15529-3-git-send-email-mark.rutland@arm.com \
--to=mark.rutland@arm.com \
--cc=ard.biesheuvel@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=hpa@zytor.com \
--cc=leif.lindholm@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).