From: Matt Fleming <matt@codeblueprint.co.uk>
To: Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H . Peter Anvin" <hpa@zytor.com>
Cc: Alex Thorlton <athorlton@sgi.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org,
Matt Fleming <matt@codeblueprint.co.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Dimitri Sivanich <sivanich@sgi.com>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Roy Franz <roy.franz@linaro.org>, Russ Anderson <rja@sgi.com>,
Russell King <linux@armlinux.org.uk>,
Will Deacon <will.deacon@arm.com>
Subject: [PATCH 6/7] x86/efi: Update efi_thunk to use the the arch_efi_call_virt* macros
Date: Sat, 25 Jun 2016 08:20:29 +0100 [thread overview]
Message-ID: <1466839230-12781-7-git-send-email-matt@codeblueprint.co.uk> (raw)
In-Reply-To: <1466839230-12781-1-git-send-email-matt@codeblueprint.co.uk>
From: Alex Thorlton <athorlton@sgi.com>
Currently, the efi_thunk macro has some semi-duplicated code in it that
can be replaced with the arch_efi_call_virt_setup/teardown macros. This
commit simply replaces the duplicated code with those macros.
Signed-off-by: Alex Thorlton <athorlton@sgi.com>
Suggested-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Russ Anderson <rja@sgi.com>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Roy Franz <roy.franz@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-efi@vger.kernel.org
Cc: x86@kernel.org
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
---
arch/x86/platform/efi/efi_64.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index 6e7242be1c87..4cc2b9688dc2 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -469,18 +469,13 @@ extern efi_status_t efi64_thunk(u32, ...);
unsigned long flags; \
u32 func; \
\
- efi_sync_low_kernel_mappings(); \
local_irq_save(flags); \
- \
- efi_scratch.prev_cr3 = read_cr3(); \
- write_cr3((unsigned long)efi_scratch.efi_pgt); \
- __flush_tlb_all(); \
+ arch_efi_call_virt_setup(); \
\
func = runtime_service32(f); \
- __s = efi64_thunk(func, __VA_ARGS__); \
+ __s = efi64_thunk(func, __VA_ARGS__); \
\
- write_cr3(efi_scratch.prev_cr3); \
- __flush_tlb_all(); \
+ arch_efi_call_virt_teardown(); \
local_irq_restore(flags); \
\
__s; \
--
2.7.3
prev parent reply other threads:[~2016-06-25 7:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-25 7:20 [GIT PULL 0/7] EFI changes for v4.8 Matt Fleming
2016-06-25 7:20 ` [PATCH 1/7] efibc: Report more information in the error messages Matt Fleming
[not found] ` <1466839230-12781-1-git-send-email-matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-06-25 7:20 ` [PATCH 2/7] efi: Document #define FOO_PROTOCOL_GUID layout Matt Fleming
[not found] ` <1466839230-12781-3-git-send-email-matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-06-27 10:49 ` Ingo Molnar
2016-06-27 11:14 ` Joe Perches
2016-07-04 13:17 ` Matt Fleming
2016-06-25 7:20 ` [PATCH 3/7] x86/efi: Remove unused variable efi Matt Fleming
2016-06-25 7:20 ` [PATCH 4/7] efi: Convert efi_call_virt to efi_call_virt_pointer Matt Fleming
[not found] ` <1466839230-12781-5-git-send-email-matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-06-27 11:00 ` Ingo Molnar
[not found] ` <20160627110050.GB9099-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-27 11:22 ` Mark Rutland
2016-07-04 13:18 ` Matt Fleming
2016-06-25 7:20 ` [PATCH 5/7] x86/uv: Update uv_bios_call to use efi_call_virt_pointer Matt Fleming
2016-06-25 7:20 ` [PATCH 7/7] x86/efi: Remove unused efi_get_time function Matt Fleming
2016-06-25 7:20 ` Matt Fleming [this message]
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=1466839230-12781-7-git-send-email-matt@codeblueprint.co.uk \
--to=matt@codeblueprint.co.uk \
--cc=ard.biesheuvel@linaro.org \
--cc=athorlton@sgi.com \
--cc=catalin.marinas@arm.com \
--cc=hpa@zytor.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=rja@sgi.com \
--cc=roy.franz@linaro.org \
--cc=sivanich@sgi.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).