Do a complete FPU context save/restore around the EFI calls. This required
as runtime EFI firmware may potentially use the FPU.

This change covers only the x86_64 configuration.

Signed-off-by: Ricardo Neri <[email protected]>
---
 arch/x86/include/asm/efi.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index 004bbf1..fc99bd1 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -1,6 +1,7 @@
 #ifndef _ASM_X86_EFI_H
 #define _ASM_X86_EFI_H
 
+#include <asm/i387.h>
 /*
  * We map the EFI regions needed for runtime services non-contiguously,
  * with preserved alignment on virtual addresses starting from -4G down
@@ -52,7 +53,9 @@ extern u64 asmlinkage efi_call(void *fp, ...);
                                                                        \
        efi_sync_low_kernel_mappings();                                 \
        preempt_disable();                                              \
+       __kernel_fpu_begin();                                           \
        __s = efi_call((void *)efi.systab->runtime->f, __VA_ARGS__);    \
+       __kernel_fpu_end();                                             \
        preempt_enable();                                               \
        __s;                                                            \
 })
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to