arm64: add support for kernel mode NEON


Linux-SWAT

Forum Addict!
Joined
Feb 13, 2010
Messages
9,187
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4cfb36136480c029a29dbf63a623506e6ed7282b

Add <asm/neon.h> containing kernel_neon_begin/kernel_neon_end function declarations and corresponding definitions in fpsimd.c These are needed to wrap uses of NEON in kernel mode. The names are identical to the ones used in arm/ so code using intrinsics or vectorized by GCC can be shared between arm and arm64.
Can this be of any use for us ?

-EDIT, i should have posted this in neon section, mods !
 
Last edited by a moderator:
This isn't relevant to anything but kernel code, and I doubt there's much pressing desire to have NEON code in the Pandora kernel.

Normally FPU/SIMD isn't allowed in the kernel for two reasons: because the registers aren't saved and restored on the transition from user to kernel mode, and because they're not saved/restored when the kernel preempts itself. These declarations get around it by saving and restoring the current register context and by disabling kernel preemption entirely. It's something that should be avoided if possible because w/o preemption you run the risk of not being able to handle faults and missing interrupts.
 
Back
Top