diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2014-02-24 15:26:29 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2014-05-08 11:31:57 +0200 |
commit | 190f1ca85d071114930dd7abe6b5d103e9d5572f (patch) | |
tree | 27344d61659e775df00892c8a13ae2473aad29b1 /arch/arm64/kernel/entry-fpsimd.S | |
parent | 005f78cd88494457ed38ce817f4e3fe5d372f0cb (diff) | |
download | linux-stable-190f1ca85d071114930dd7abe6b5d103e9d5572f.tar.gz linux-stable-190f1ca85d071114930dd7abe6b5d103e9d5572f.tar.bz2 linux-stable-190f1ca85d071114930dd7abe6b5d103e9d5572f.zip |
arm64: add support for kernel mode NEON in interrupt context
This patch modifies kernel_neon_begin() and kernel_neon_end(), so
they may be called from any context. To address the case where only
a couple of registers are needed, kernel_neon_begin_partial(u32) is
introduced which takes as a parameter the number of bottom 'n' NEON
q-registers required. To mark the end of such a partial section, the
regular kernel_neon_end() should be used.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'arch/arm64/kernel/entry-fpsimd.S')
-rw-r--r-- | arch/arm64/kernel/entry-fpsimd.S | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm64/kernel/entry-fpsimd.S b/arch/arm64/kernel/entry-fpsimd.S index 6a27cd6dbfa6..d358ccacfc00 100644 --- a/arch/arm64/kernel/entry-fpsimd.S +++ b/arch/arm64/kernel/entry-fpsimd.S @@ -41,3 +41,27 @@ ENTRY(fpsimd_load_state) fpsimd_restore x0, 8 ret ENDPROC(fpsimd_load_state) + +#ifdef CONFIG_KERNEL_MODE_NEON + +/* + * Save the bottom n FP registers. + * + * x0 - pointer to struct fpsimd_partial_state + */ +ENTRY(fpsimd_save_partial_state) + fpsimd_save_partial x0, 1, 8, 9 + ret +ENDPROC(fpsimd_load_partial_state) + +/* + * Load the bottom n FP registers. + * + * x0 - pointer to struct fpsimd_partial_state + */ +ENTRY(fpsimd_load_partial_state) + fpsimd_restore_partial x0, 8, 9 + ret +ENDPROC(fpsimd_load_partial_state) + +#endif |