aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/Kconfig
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2013-05-16 05:41:48 -0400
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2013-07-08 17:08:51 -0400
commit73c132c15da504789b924871e2491479a18e4f6a (patch)
treee5aab4cb0d9263419677a4aa9aea392ffad76053 /arch/arm/Kconfig
parentab3da15643469ab2d206dee3d9cfa4194ba77f25 (diff)
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
2197 Say Y to include support code for NEON, the ARMv7 Advanced SIMD 2197 Say Y to include support code for NEON, the ARMv7 Advanced SIMD
2198 Extension. 2198 Extension.
2199 2199
2200config KERNEL_MODE_NEON
2201 bool "Support for NEON in kernel mode"
2202 default n
2203 depends on NEON
2204 help
2205 Say Y to include support for NEON in kernel mode.
2206
2200endmenu 2207endmenu
2201 2208
2202menu "Userspace binary formats" 2209menu "Userspace binary formats"