Is VFP or Neon supported in kernel-side code? <EOM>
tixy at yxit.co.uk
Wed Apr 20 14:08:37 UTC 2011
On Wed, 2011-04-20 at 15:48 +0200, Arnd Bergmann wrote:
> In general, you cannot use any FP code in the kernel, and there are few exceptions
> to that. I'm not sure about Neon here, but in general, you have to save the FP
> registers of the user process and enable the FPU using kernel_fpu_begin() or
> enable_kernel_fp() and release the FPU context using kernel_fpu_end() or
> disable_kernel_fp() depending on the architecture, before returning to user space.
> I could not find these functions for ARM, maybe they have yet another name.
> If they don't exist, you might have to add them. In either way, saving the
> FPU state is generally expensive, so it's worth it only if we use many FP
> operations at once.
Thanks, that's useful information.
Being new to Linux, I wanted to know the answer to the general question,
but for my immediate needs I just needed to if it's supported and common
enough for me to fix kprobes to allow probing such code. Dave and
Nicolas indicated 'not for now', so I happily put it to the back of my
More information about the linaro-kernel