Floating point in Linux Kernel - MarekBykowski/readme GitHub Wiki
HOME » Linux Kernel facilities » Floating point in Linux Kernel
Floating-point in Linux Kernel
http://porterchen-note.blogspot.com/2011/03/linux-kernel-and-floating-point.html
/*
* Goal here is to save needless saving/restoring the NEON context at each task switching out/in, lightly said,
* that is not happening often. To serve the purpose:
* - for each userland task having NEON register file used we keep a track of what CPU it used before it
* got switched out. If NULL then it was a kernel
* - for each CPU (per-cpu) we keep a track of a task that used the NEON register file recently
*
* If the two are in sync/ yield the same then we go saving/storing the context. If not we ignore it.
*
* Kernel is treated differently here as while in NEON preemption and interrupts are off. As a result
* it mustn't sleep while there.
*
*/
kernel_neon_begin();
xor_block_neon_inner.do_2(bytes, p1, p2);
kernel_neon_end();