summaryrefslogtreecommitdiffstats
path: root/arch/arm/Kconfig
diff options
context:
space:
mode:
authorArd Biesheuvel2013-05-16 11:41:48 +0200
committerArd Biesheuvel2013-07-08 23:08:51 +0200
commit73c132c15da504789b924871e2491479a18e4f6a (patch)
treee5aab4cb0d9263419677a4aa9aea392ffad76053 /arch/arm/Kconfig
parentARM: be strict about FP exceptions in kernel mode (diff)
downloadkernel-qcow2-linux-73c132c15da504789b924871e2491479a18e4f6a.tar.gz
kernel-qcow2-linux-73c132c15da504789b924871e2491479a18e4f6a.tar.xz
kernel-qcow2-linux-73c132c15da504789b924871e2491479a18e4f6a.zip
ARM: add support for kernel mode NEON
In order to safely support the use of NEON instructions in kernel mode, some precautions need to be taken: - the userland context that may be present in the registers (even if the NEON/VFP is currently disabled) must be stored under the correct task (which may not be 'current' in the UP case), - to avoid having to keep track of additional vfpstates for the kernel side, disallow the use of NEON in interrupt context and run with preemption disabled, - after use, re-enable preemption and re-enable the lazy restore machinery by disabling the NEON/VFP unit. This patch adds the functions kernel_neon_begin() and kernel_neon_end() which take care of the above. It also adds the Kconfig symbol KERNEL_MODE_NEON to enable it. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Nicolas Pitre <nico@linaro.org>
Diffstat (limited to 'arch/arm/Kconfig')
-rw-r--r--arch/arm/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 136f263ed47b..d6068b435151 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -2197,6 +2197,13 @@ config NEON
Say Y to include support code for NEON, the ARMv7 Advanced SIMD
Extension.
+config KERNEL_MODE_NEON
+ bool "Support for NEON in kernel mode"
+ default n
+ depends on NEON
+ help
+ Say Y to include support for NEON in kernel mode.
+
endmenu
menu "Userspace binary formats"