[PATCH] XOR implementation for ARMv8
From: Ard Biesheuvel <hidden>
Date: 2015-06-24 08:51:06
On 24 June 2015 at 10:29, J?r?me Forissier [off-list ref] wrote:
On 06/24/2015 09:00 AM, ??? wrote:quoted
Use the 128-bit SIMD registers and SIMD arithmetic instructions for XOR calculation in assembly language.Don't you need kernel_neon_begin()/kernel_neon_end() somewhere? (see Documentation/arm/kernel_mode_neon.txt).
Jerome is right: use of this driver will corrupt the FP/SIMD state of arbitrary userland tasks if you don't explicitly claim the NEON for in-kernel use by calling kernel_neon_begin)_ and end() Since XOR may be called in interrupt context, this could add a fixed overhead to each call, even if you are calling the function many times in a row. This means you may be better off using even fewer registers, and use kernel_neon_begin_partial() instead. May I ask what kind of core you tested this on? -- Ard.