x86: make x86_64 a subtarget instead of a standalone target
[openwrt.git] / package / kernel / linux / modules / crypto.mk
index 2f1d33f..d1ae061 100644 (file)
@@ -262,10 +262,12 @@ define KernelPackage/crypto-aes
   $(call AddDepends/crypto)
 endef
 
-define KernelPackage/crypto-aes/x86
-  FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.ko
-  AUTOLOAD:=$(call AutoLoad,09,aes-i586)
-endef
+ifndef CONFIG_TARGET_x86_64
+  define KernelPackage/crypto-aes/x86
+    FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.ko
+    AUTOLOAD:=$(call AutoLoad,09,aes-i586)
+  endef
+endif
 
 $(eval $(call KernelPackage,crypto-aes))
 
@@ -329,13 +331,10 @@ define KernelPackage/crypto-crc32c
   TITLE:=CRC32c CRC module
   DEPENDS:=+kmod-crypto-hash
   KCONFIG:=CONFIG_CRYPTO_CRC32C
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.15.0)),1)
-  FILES:=$(LINUX_DIR)/crypto/crc32c_generic.ko
-  AUTOLOAD:=$(call AutoLoad,04,crc32c_generic,1)
-else
-  FILES:=$(LINUX_DIR)/crypto/crc32c.ko
-  AUTOLOAD:=$(call AutoLoad,04,crc32c,1)
-endif
+  FILES:= \
+       $(LINUX_DIR)/crypto/crc32c.ko@lt3.15 \
+       $(LINUX_DIR)/crypto/crc32c_generic.ko@ge3.15
+  AUTOLOAD:=$(call AutoLoad,04,crc32c@lt3.15 crc32c_generic@ge3.15,1)
   $(call AddDepends/crypto)
 endef
 
@@ -533,9 +532,11 @@ define KernelPackage/crypto-misc
   $(call AddDepends/crypto)
 endef
 
-define KernelPackage/crypto-misc/x86
-  FILES+=$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko
-endef
+ifndef CONFIG_TARGET_x86_64
+  define KernelPackage/crypto-misc/x86
+    FILES+=$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko
+  endef
+endif
 
 $(eval $(call KernelPackage,crypto-misc))