diff options
author | Dave Martin <Dave.Martin@arm.com> | 2017-09-18 09:40:12 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2017-09-18 11:20:17 +0100 |
commit | e580b8bc4316cbb8bbffb5ed7bf1e477064755ed (patch) | |
tree | e8d012d76b5411cfef3cfec099deae716f9a8aa1 /arch/arm64 | |
parent | 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff) | |
download | linux-stable-e580b8bc4316cbb8bbffb5ed7bf1e477064755ed.tar.gz linux-stable-e580b8bc4316cbb8bbffb5ed7bf1e477064755ed.tar.bz2 linux-stable-e580b8bc4316cbb8bbffb5ed7bf1e477064755ed.zip |
arm64: efi: Don't include EFI fpsimd save/restore code in non-EFI kernels
__efi_fpsimd_begin()/__efi_fpsimd_end() are for use when making EFI
calls only, so using them in non-EFI kernels is not allowed.
This patch compiles them out if CONFIG_EFI is not set.
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/fpsimd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 3a68cf38a6b3..f444f374bd7b 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -321,6 +321,8 @@ void kernel_neon_end(void) } EXPORT_SYMBOL(kernel_neon_end); +#ifdef CONFIG_EFI + static DEFINE_PER_CPU(struct fpsimd_state, efi_fpsimd_state); static DEFINE_PER_CPU(bool, efi_fpsimd_state_used); @@ -370,6 +372,8 @@ void __efi_fpsimd_end(void) kernel_neon_end(); } +#endif /* CONFIG_EFI */ + #endif /* CONFIG_KERNEL_MODE_NEON */ #ifdef CONFIG_CPU_PM |