]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: arm64/crc32 - accelerated support based on x86 SSE implementation
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 5 Dec 2016 18:42:27 +0000 (18:42 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 7 Dec 2016 12:01:22 +0000 (20:01 +0800)
commit81bfa15984036b28964cf33b53130dab6c050a38
tree75fcea660971403632402ae8114ca4d88fe535fe
parentcb9625bffbf6fd4ed7220c31d2724df95300216b
crypto: arm64/crc32 - accelerated support based on x86 SSE implementation

This is a combination of the the Intel algorithm implemented using SSE
and PCLMULQDQ instructions from arch/x86/crypto/crc32-pclmul_asm.S, and
the new CRC32 extensions introduced for both 32-bit and 64-bit ARM in
version 8 of the architecture. Two versions of the above combo are
provided, one for CRC32 and one for CRC32C.

The PMULL/NEON algorithm is faster, but operates on blocks of at least
64 bytes, and on multiples of 16 bytes only. For the remaining input,
or for all input on systems that lack the PMULL 64x64->128 instructions,
the CRC32 instructions will be used.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/Kconfig
arch/arm64/crypto/Makefile
arch/arm64/crypto/crc32-ce-core.S [new file with mode: 0644]
arch/arm64/crypto/crc32-ce-glue.c [new file with mode: 0644]