From 4443470a575b6fd775ff7c9d5eb40024db003213 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Wed, 6 Mar 2024 18:38:28 +0100 Subject: [PATCH] kernel: crypto: add SHA2(224 and 256) ARM64 CE optimized module Kernel has optimized version of SHA2(224 and 256) 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 --- package/kernel/linux/modules/crypto.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 839e1bd45f..f7ba0a7b29 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -985,6 +985,7 @@ define KernelPackage/crypto-sha256 CONFIG_CRYPTO_SHA256_OCTEON \ CONFIG_CRYPTO_SHA256_PPC_SPE \ CONFIG_CRYPTO_SHA256_ARM64 \ + CONFIG_CRYPTO_SHA2_ARM64_CE \ CONFIG_CRYPTO_SHA256_SSSE3 FILES:= \ $(LINUX_DIR)/crypto/sha256_generic.ko \ @@ -998,6 +999,12 @@ define KernelPackage/crypto-sha256/aarch64 AUTOLOAD+=$(call AutoLoad,09,sha256-arm64) endef +define KernelPackage/crypto-sha256/aarch64-ce + $(call KernelPackage/crypto-sha256/aarch64) + FILES+=$(LINUX_DIR)/arch/arm64/crypto/sha2-ce.ko + AUTOLOAD+=$(call AutoLoad,09,sha2-ce) +endef + define KernelPackage/crypto-sha256/octeon FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha256.ko AUTOLOAD+=$(call AutoLoad,09,octeon-sha256) @@ -1015,6 +1022,8 @@ define KernelPackage/crypto-sha256/x86_64 endef endif +KernelPackage/crypto-sha256/qualcommax=$(KernelPackage/crypto-sha256/aarch64-ce) + ifdef KernelPackage/crypto-sha256/$(ARCH) KernelPackage/crypto-sha256/$(CRYPTO_TARGET)=\ $(KernelPackage/crypto-sha256/$(ARCH)) -- 2.30.2