Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6f0b23bc authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Samir Mehta
Browse files

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.

Change-Id: I286f9d414e87568f094b7782762faea46c6d4831
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarChris Fries <cfries@motorola.com>
Git-commit: 7c8865cc8b5afabec1952a172dbd79350e1844c0
Git-repo: https://android.googlesource.com/kernel/common/


Signed-off-by: default avatarSamir Mehta <samirn@codeaurora.org>
parent c2aa9574
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment