UPSTREAM: crypto: arm/chacha20 - always use vrev for 16-bit rotates
authorEric Biggers <ebiggers@google.com>
Wed, 25 Jul 2018 01:29:07 +0000 (18:29 -0700)
committerEric Biggers <ebiggers@google.com>
Wed, 5 Dec 2018 20:30:44 +0000 (12:30 -0800)
commite5577b7a50f1c7c002a05082d2a650adf6baa8bf
tree5f21c3fdc4f1f4213caf0aecd3412a2ce08de432
parent4cf145fc1fdb5a0cd1d9761d60751ac79e4b5994
UPSTREAM: crypto: arm/chacha20 - always use vrev for 16-bit rotates

The 4-way ChaCha20 NEON code implements 16-bit rotates with vrev32.16,
but the one-way code (used on remainder blocks) implements it with
vshl + vsri, which is slower.  Switch the one-way code to vrev32.16 too.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 4e34e51f48ab7f77a4022aa810a786daa3eb3e22)
Bug: 112008522
Test: As series, see Ic61c13b53facfd2173065be715a7ee5f3af8760b
Change-Id: If6f8ea9545aa6ed0478e812d6e17400c186b003b
Signed-off-by: Eric Biggers <ebiggers@google.com>
arch/arm/crypto/chacha20-neon-core.S