]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: arm64/aes-neonbs-ctr - fallback to plain NEON for final chunk
authorArd Biesheuvel <ardb@kernel.org>
Thu, 27 Jan 2022 11:35:44 +0000 (12:35 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 5 Feb 2022 04:10:51 +0000 (15:10 +1100)
commitf8bc4eb3b747eb2611bfc6d1d79e324474393c5d
treebd626b745bb39ebd97f5b932ff4f4a2948111b1c
parentb15b4aed2158655f6a73766c66302d92012c1a3d
crypto: arm64/aes-neonbs-ctr - fallback to plain NEON for final chunk

Instead of processing the entire input with the 8-way bit sliced
algorithm, which is sub-optimal for inputs that are not a multiple of
128 bytes in size, invoke the plain NEON version of CTR for the
remainder of the input after processing the bulk using 128 byte strides.

This allows us to greatly simplify the asm code that implements CTR, and
get rid of all the branches and special code paths. It also gains us a
couple of percent of performance.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/aes-glue.c
arch/arm64/crypto/aes-neonbs-core.S
arch/arm64/crypto/aes-neonbs-glue.c