| 8fdef85d | 30-Mar-2026 |
Ard Biesheuvel <ardb@kernel.org> |
lib/crc: arm64: Simplify intrinsics implementation
NEON intrinsics are useful because they remove the need for manual register allocation, and the resulting code can be re-compiled and optimized for
lib/crc: arm64: Simplify intrinsics implementation
NEON intrinsics are useful because they remove the need for manual register allocation, and the resulting code can be re-compiled and optimized for different micro-architectures, and shared between arm64 and 32-bit ARM.
However, the strong typing of the vector variables can lead to incomprehensible gibberish, as is the case with the new CRC64 implementation. To address this, let's repaint all variables as uint64x2_t to minimize the number of vreinterpretq_xxx() calls, and to be able to rely on the ^ operator for exclusive OR operations. This makes the code much more concise and readable.
While at it, wrap the calls to vmull_p64() et al in order to have a more consistent calling convention, and encapsulate any remaining vreinterpret() calls that are still needed.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20260330144630.33026-11-ardb@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
show more ...
|
| e0718ed6 | 30-Mar-2026 |
Ard Biesheuvel <ardb@kernel.org> |
lib/crc: arm64: Drop unnecessary chunking logic from crc64
On arm64, kernel mode NEON executes with preemption enabled, so there is no need to chunk the input by hand.
Signed-off-by: Ard Biesheuvel
lib/crc: arm64: Drop unnecessary chunking logic from crc64
On arm64, kernel mode NEON executes with preemption enabled, so there is no need to chunk the input by hand.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20260330144630.33026-8-ardb@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
show more ...
|
| 5276ea17 | 01-Apr-2026 |
Eric Biggers <ebiggers@kernel.org> |
lib/crc: arm64: Assume a little-endian kernel
Since support for big-endian arm64 kernels was removed, the CPU_LE() macro now unconditionally emits the code it is passed, and the CPU_BE() macro now u
lib/crc: arm64: Assume a little-endian kernel
Since support for big-endian arm64 kernels was removed, the CPU_LE() macro now unconditionally emits the code it is passed, and the CPU_BE() macro now unconditionally discards the code it is passed.
Simplify the assembly code in lib/crc/arm64/ accordingly.
Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20260401004431.151432-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
show more ...
|
| 5ff74f5f | 16-Aug-2025 |
Eric Biggers <ebiggers@kernel.org> |
lib/crc: Drop inline from all *_mod_init_arch() functions
Drop 'inline' from all the *_mod_init_arch() functions so that the compiler will warn about any bugs where they are unused due to not being
lib/crc: Drop inline from all *_mod_init_arch() functions
Drop 'inline' from all the *_mod_init_arch() functions so that the compiler will warn about any bugs where they are unused due to not being wired up properly. (There are no such bugs currently, so this just establishes a more robust convention for the future. Of course, these functions also tend to get inlined anyway, regardless of the keyword.)
Link: https://lore.kernel.org/r/20250816020240.431545-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
show more ...
|