[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1466839230-12781-7-git-send-email-matt@codeblueprint.co.uk>
Date: Sat, 25 Jun 2016 08:20:29 +0100
From: Matt Fleming <matt@...eblueprint.co.uk>
To: Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H . Peter Anvin" <hpa@...or.com>
Cc: Alex Thorlton <athorlton@....com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
linux-kernel@...r.kernel.org, linux-efi@...r.kernel.org,
Matt Fleming <matt@...eblueprint.co.uk>,
Catalin Marinas <catalin.marinas@....com>,
Dimitri Sivanich <sivanich@....com>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Roy Franz <roy.franz@...aro.org>, Russ Anderson <rja@....com>,
Russell King <linux@...linux.org.uk>,
Will Deacon <will.deacon@....com>
Subject: [PATCH 6/7] x86/efi: Update efi_thunk to use the the arch_efi_call_virt* macros
From: Alex Thorlton <athorlton@....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@....com>
Suggested-by: Matt Fleming <matt@...eblueprint.co.uk>
Cc: Russ Anderson <rja@....com>
Cc: Dimitri Sivanich <sivanich@....com>
Cc: Russell King <linux@...linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Will Deacon <will.deacon@....com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Roy Franz <roy.franz@...aro.org>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-efi@...r.kernel.org
Cc: x86@...nel.org
Signed-off-by: Matt Fleming <matt@...eblueprint.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
Powered by blists - more mailing lists