arm64: lib: accelerate crc32_be
authorKevin Bracey <kevin@bracey.fi>
Tue, 18 Jan 2022 10:23:51 +0000 (12:23 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 31 Jan 2022 00:21:43 +0000 (11:21 +1100)
commit5f2f5eaa3e373c3a07a4f3552fe13d9cde5e23e5
tree0e1052b3c560bb62dd68e74b379da22f6d190d47
parent1b3dce8b8ab30bb9f1401acefa08a47dc46f0813
arm64: lib: accelerate crc32_be

It makes no sense to leave crc32_be using the generic code while we
only accelerate the little-endian ops.

Even though the big-endian form doesn't fit as smoothly into the arm64,
we can speed it up and avoid hitting the D cache.

Tested on Cortex-A53. Without acceleration:

    crc32: CRC_LE_BITS = 64, CRC_BE BITS = 64
    crc32: self tests passed, processed 225944 bytes in 192240 nsec
    crc32c: CRC_LE_BITS = 64
    crc32c: self tests passed, processed 112972 bytes in 21360 nsec

With acceleration:

    crc32: CRC_LE_BITS = 64, CRC_BE BITS = 64
    crc32: self tests passed, processed 225944 bytes in 53480 nsec
    crc32c: CRC_LE_BITS = 64
    crc32c: self tests passed, processed 112972 bytes in 21480 nsec

Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Tested-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/lib/crc32.S