Skip to content

Commit 5d3d9c8

Browse files
Ard Biesheuvelherbertx
authored andcommitted
crypto: arm64/crc32 - merge CRC32 and PMULL instruction based drivers
The PMULL based CRC32 implementation already contains code based on the separate, optional CRC32 instructions to fallback to when operating on small quantities of data. We can expose these routines directly on systems that lack the 64x64 PMULL instructions but do implement the CRC32 ones, which makes the driver that is based solely on those CRC32 instructions redundant. So remove it. Note that this aligns arm64 with ARM, whose accelerated CRC32 driver also combines the CRC32 extension based and the PMULL based versions. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Matthias Brugger <mbrugger@suse.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 1a20b96 commit 5d3d9c8

File tree

5 files changed

+41
-312
lines changed

5 files changed

+41
-312
lines changed

arch/arm64/configs/defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,4 +516,3 @@ CONFIG_CRYPTO_GHASH_ARM64_CE=y
516516
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
517517
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
518518
# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set
519-
CONFIG_CRYPTO_CRC32_ARM64=y

arch/arm64/crypto/Kconfig

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ config CRYPTO_CRCT10DIF_ARM64_CE
3737
select CRYPTO_HASH
3838

3939
config CRYPTO_CRC32_ARM64_CE
40-
tristate "CRC32 and CRC32C digest algorithms using PMULL instructions"
41-
depends on KERNEL_MODE_NEON && CRC32
40+
tristate "CRC32 and CRC32C digest algorithms using ARMv8 extensions"
41+
depends on CRC32
4242
select CRYPTO_HASH
4343

4444
config CRYPTO_AES_ARM64
@@ -71,11 +71,6 @@ config CRYPTO_AES_ARM64_NEON_BLK
7171
select CRYPTO_AES
7272
select CRYPTO_SIMD
7373

74-
config CRYPTO_CRC32_ARM64
75-
tristate "CRC32 and CRC32C using optional ARMv8 instructions"
76-
depends on ARM64
77-
select CRYPTO_HASH
78-
7974
config CRYPTO_CHACHA20_NEON
8075
tristate "NEON accelerated ChaCha20 symmetric cipher"
8176
depends on KERNEL_MODE_NEON

arch/arm64/crypto/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ AFLAGS_aes-neon.o := -DINTERLEAVE=4
5555

5656
CFLAGS_aes-glue-ce.o := -DUSE_V8_CRYPTO_EXTENSIONS
5757

58-
obj-$(CONFIG_CRYPTO_CRC32_ARM64) += crc32-arm64.o
59-
60-
CFLAGS_crc32-arm64.o := -mcpu=generic+crc
61-
6258
$(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE
6359
$(call if_changed_rule,cc_o_c)
6460

arch/arm64/crypto/crc32-arm64.c

Lines changed: 0 additions & 290 deletions
This file was deleted.

0 commit comments

Comments
 (0)