kernel: crypto: add SHA512 ARM64 ASM optimized module
authorRobert Marko <robimarko@gmail.com>
Wed, 6 Mar 2024 20:54:07 +0000 (21:54 +0100)
committerRobert Marko <robimarko@gmail.com>
Wed, 6 Mar 2024 21:00:58 +0000 (22:00 +0100)
Kernel has an ASM optimized version of SHA512 that was ported from
OpenSSL, so lets package it as it provides significant perfomance
improvement compared to the generic implementation.

There is a Cryptographic Extension based version as well, but that relies
on ARMv8.2 ISA which I am not aware any of the OpenWrt supported SoC-s use.

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

index f7ba0a7b2943c305b48fff478df55a23f05c33aa..55988ba92c736581a0148fa2edf8f5532eaf2b8b 100644 (file)
@@ -1038,6 +1038,7 @@ define KernelPackage/crypto-sha512
   KCONFIG:= \
        CONFIG_CRYPTO_SHA512 \
        CONFIG_CRYPTO_SHA512_ARM \
+       CONFIG_CRYPTO_SHA512_ARM64 \
        CONFIG_CRYPTO_SHA512_OCTEON \
        CONFIG_CRYPTO_SHA512_SSSE3
   FILES:=$(LINUX_DIR)/crypto/sha512_generic.ko
@@ -1050,6 +1051,11 @@ define KernelPackage/crypto-sha512/arm
   AUTOLOAD+=$(call AutoLoad,09,sha512-arm)
 endef
 
+define KernelPackage/crypto-sha512/aarch64
+  FILES+=$(LINUX_DIR)/arch/arm64/crypto/sha512-arm64.ko
+  AUTOLOAD+=$(call AutoLoad,09,sha512-arm64)
+endef
+
 KernelPackage/crypto-sha512/imx=$(KernelPackage/crypto-sha512/arm)
 KernelPackage/crypto-sha512/ipq40xx=$(KernelPackage/crypto-sha512/arm)
 KernelPackage/crypto-sha512/mvebu/cortexa9=$(KernelPackage/crypto-sha512/arm)