Commit e580b8bc authored by Dave Martin's avatar Dave Martin Committed by Catalin Marinas

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: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 2bd6bf03
...@@ -321,6 +321,8 @@ void kernel_neon_end(void) ...@@ -321,6 +321,8 @@ void kernel_neon_end(void)
} }
EXPORT_SYMBOL(kernel_neon_end); EXPORT_SYMBOL(kernel_neon_end);
#ifdef CONFIG_EFI
static DEFINE_PER_CPU(struct fpsimd_state, efi_fpsimd_state); static DEFINE_PER_CPU(struct fpsimd_state, efi_fpsimd_state);
static DEFINE_PER_CPU(bool, efi_fpsimd_state_used); static DEFINE_PER_CPU(bool, efi_fpsimd_state_used);
...@@ -370,6 +372,8 @@ void __efi_fpsimd_end(void) ...@@ -370,6 +372,8 @@ void __efi_fpsimd_end(void)
kernel_neon_end(); kernel_neon_end();
} }
#endif /* CONFIG_EFI */
#endif /* CONFIG_KERNEL_MODE_NEON */ #endif /* CONFIG_KERNEL_MODE_NEON */
#ifdef CONFIG_CPU_PM #ifdef CONFIG_CPU_PM
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment