-
Notifications
You must be signed in to change notification settings - Fork 0
Home
MarekBykowski edited this page Feb 11, 2021
·
63 revisions
Welcome to the readme wiki!
http://porterchen-note.blogspot.com/2011/03/linux-kernel-and-floating-point.html
/*
* Goal here is to save needless saving/storing the NEON context at each task switch for the NEON, lightly said,
* not being used by that often by the tasks. To serve it:
* - 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 store what task used the NEON register file
*
* 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();
#define NTH_BIT 4
unsigned int addr = 0xffffffff;
enum flags { clear, set };
addr &= ~(1<<NTH_BIT);
printf("mb: clearing %dth bit %x of %x\n", NTH_BIT, addr, 0xffffffff);
addr |= (1<<NTH_BIT);
printf("mb: setting %dth bit %x\n", NTH_BIT, addr);