kernel: crypto: add SHA1 ARM64 CE optimized module
authorRobert Marko <robimarko@gmail.com>
Wed, 6 Mar 2024 10:47:45 +0000 (11:47 +0100)
committerRobert Marko <robimarko@gmail.com>
Wed, 6 Mar 2024 11:16:11 +0000 (12:16 +0100)
Kernel has optimized version of SHA1 using the ARMv8 Crypto Extensions,
so lets package it.

Use it by default for qualcommax as it uses Cortex-A53 core and has ARMv8
CE extensions present.

Signed-off-by: Robert Marko <robimarko@gmail.com>
package/kernel/linux/modules/crypto.mk

index 84c4668b972d87d91b01c173a3a662e4b200b40a..9d5c80f8e526ee123451833fcafd588bf94be9b6 100644 (file)
@@ -908,6 +908,7 @@ define KernelPackage/crypto-sha1
        CONFIG_CRYPTO_SHA1 \
        CONFIG_CRYPTO_SHA1_ARM \
        CONFIG_CRYPTO_SHA1_ARM_NEON \
+       CONFIG_CRYPTO_SHA1_ARM64_CE \
        CONFIG_CRYPTO_SHA1_OCTEON \
        CONFIG_CRYPTO_SHA1_PPC_SPE \
        CONFIG_CRYPTO_SHA1_SSSE3
@@ -927,9 +928,15 @@ define KernelPackage/crypto-sha1/arm-neon
   AUTOLOAD+=$(call AutoLoad,09,sha1-arm-neon)
 endef
 
+define KernelPackage/crypto-sha1/aarch64-ce
+  FILES+=$(LINUX_DIR)/arch/arm64/crypto/sha1-ce.ko
+  AUTOLOAD+=$(call AutoLoad,09,sha1-ce)
+endef
+
 KernelPackage/crypto-sha1/imx=$(KernelPackage/crypto-sha1/arm-neon)
 KernelPackage/crypto-sha1/ipq40xx=$(KernelPackage/crypto-sha1/arm-neon)
 KernelPackage/crypto-sha1/mvebu/cortexa9=$(KernelPackage/crypto-sha1/arm-neon)
+KernelPackage/crypto-sha1/qualcommax=$(KernelPackage/crypto-sha1/aarch64-ce)
 
 define KernelPackage/crypto-sha1/octeon
   FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha1.ko