summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/efi.h
diff options
context:
space:
mode:
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>2014-03-27 15:10:42 -0700
committerMatt Fleming <matt.fleming@intel.com>2014-04-17 13:26:32 +0100
commitde05764e0b2a3d9559e099a2e134f8cef4500fdd (patch)
treecc42a9d42aad04402b2fdeecfbd8010fc17b1b97 /arch/x86/include/asm/efi.h
parent982e239cd2c73d2c70e14615a42c0c7391415a44 (diff)
downloadop-kernel-dev-de05764e0b2a3d9559e099a2e134f8cef4500fdd.zip
op-kernel-dev-de05764e0b2a3d9559e099a2e134f8cef4500fdd.tar.gz
x86/efi: Save and restore FPU context around efi_calls (x86_64)
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 <ricardo.neri-calderon@linux.intel.com> Cc: Borislav Petkov <bp@suse.de> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/include/asm/efi.h')
-rw-r--r--arch/x86/include/asm/efi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index 19292e7..0b19187 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
@@ -54,7 +55,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; \
})
OpenPOWER on IntegriCloud