Re: [PATCH] lib/crypto: arm64: Drop checks for CONFIG_KERNEL_MODE_NEON

Ard Biesheuvel
2026-03-17T15:08:46Z

On Tue, 17 Mar 2026, at 15:45, Christoph Hellwig wrote:
> On Tue, Mar 17, 2026 at 12:09:34PM +0100, Ard Biesheuvel wrote:
>> Acked-by: Ard Biesheuvel <ardb@kernel.org>
>>
>> Actually, we should just get rid of CONFIG_KERNEL_MODE_NEON entirely on arm64, although there is some code shared with ARM that would still need some checks. But anything that is arm64-only should never look at this at all.
>
> I'll also drop it from the XOR series.
>

Ack - mind cc'ing me on the next revision?

> Talking about which (sorry for highjacking this thread), arm32 and arm64
> have completely different neon XOR implementations, where arm32 uses
> #pragma GCC optimize "tree-vectorize" or clang auto-vectorization of
> the generic C implementation, and arm64 uses intrinsics. Is there any
> chance those could share a single implementation?

If we're migrating the XOR arch code to live under lib (if that is what you are proposing), I think we could tweak the arm64 implementation to make it build for ARM too, with the caveat that the 3-input EOR3 instruction does not exist there.