Skip to contentSkip to conversation

crypto: hisilicon - qm depends on UACCE

PATCH In review Hongbo Yao 3 participants 4 messages Feb 25, 2020 – Feb 26, 2020

Subsystems (2)
lore
Share & tools
lore

Hongbo Yao

author
#0 lore raw

PATCH 1/1 crypto: hisilicon - qm depends on UACCE

If UACCE=m and CRYPTO_DEV_HISI_QM=y, the following error is seen while building qm.o:

drivers/crypto/hisilicon/qm.o: In function `hisi_qm_init':
(.text+0x23c6): undefined reference to uacce_alloc' (.text+0x2474): undefined reference to uacce_remove' (.text+0x286b): undefined reference to uacce_remove' drivers/crypto/hisilicon/qm.o: In function hisi_qm_uninit':
(.text+0x2918): undefined reference to `uacce_remove' make[1]: *** [vmlinux] Error 1
make: *** [autoksyms_recursive] Error 2

It has the similar issue while CONFIG_CRYPTO_DEV_HISI_ZIP=y, fix the config dependency for QM or ZIP here.

---
 drivers/crypto/hisilicon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/hisilicon/Kconfig +1 -0
index 8851161f722f..b35c2ec15bc2 100644
@@ -40,6 +40,7 @@ config CRYPTO_DEV_HISI_QM
 	tristate
 	depends on ARM64 || COMPILE_TEST
 	depends on PCI && PCI_MSI
+	depends on UACCE
 	help
 	  HiSilicon accelerator engines use a common queue management
 	  interface. Specific engine driver may use this module.
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 27 lines · Hongbo Yao

If UACCE=m and CRYPTO_DEV_HISI_QM=y, the following error is seen while building qm.o:

drivers/crypto/hisilicon/qm.o: In function `hisi_qm_init':
(.text+0x23c6): undefined reference to uacce_alloc' (.text+0x2474): undefined reference to uacce_remove' (.text+0x286b): undefined reference to uacce_remove' drivers/crypto/hisilicon/qm.o: In function hisi_qm_uninit':
(.text+0x2918): undefined reference to `uacce_remove' make[1]: *** [vmlinux] Error 1
make: *** [autoksyms_recursive] Error 2

It has the similar issue while CONFIG_CRYPTO_DEV_HISI_ZIP=y, fix the config dependency for QM or ZIP here.

---
 drivers/crypto/hisilicon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/hisilicon/Kconfig +0 -0
index 8851161f722f..b35c2ec15bc2 100644

drivers/crypto/hisilicon/Kconfig config CRYPTO_DEV_HISI_QM · line 46

Quoted 7 lines
drivers/crypto/hisilicon/Kconfig +1 -0
@@ -40,6 +40,7 @@ config CRYPTO_DEV_HISI_QM
 	tristate
 	depends on ARM64 || COMPILE_TEST
 	depends on PCI && PCI_MSI
+	depends on UACCE
 	help
 	  HiSilicon accelerator engines use a common queue management
 	  interface. Specific engine driver may use this module.

Indeed, this driver does not depend on uacce fully, as if there is no uacce, it still can register to kernel crypto.

Seems that changing uacce config to bool can avoid this problem.

Best,
Zhou

maintainer
#2 lore raw
Quoted 18 lines · Zhou Wang
Quoted 7 lines
drivers/crypto/hisilicon/Kconfig +0 -0
index 8851161f722f..b35c2ec15bc2 100644

drivers/crypto/hisilicon/Kconfig config CRYPTO_DEV_HISI_QM · line 46

Quoted 7 lines
drivers/crypto/hisilicon/Kconfig +1 -0
@@ -40,6 +40,7 @@ config CRYPTO_DEV_HISI_QM
 	tristate
 	depends on ARM64 || COMPILE_TEST
 	depends on PCI && PCI_MSI
+	depends on UACCE
 	help
 	  HiSilicon accelerator engines use a common queue management
 	  interface. Specific engine driver may use this module.

Indeed, this driver does not depend on uacce fully, as if there is no uacce, it still can register to kernel crypto.

Quoted 1 line

Seems that changing uacce config to bool can avoid this problem.

You shouldn't make it a bool. The standard way to solve this is to add this:

	depends on UACCE || UACCE=n

Cheers,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
maintainer
#3 lore raw
Quoted 19 lines · Herbert Xu
Quoted 18 lines · Zhou Wang
Quoted 7 lines
drivers/crypto/hisilicon/Kconfig +0 -0
index 8851161f722f..b35c2ec15bc2 100644

drivers/crypto/hisilicon/Kconfig config CRYPTO_DEV_HISI_QM · line 46

Quoted 7 lines
drivers/crypto/hisilicon/Kconfig +1 -0
@@ -40,6 +40,7 @@ config CRYPTO_DEV_HISI_QM
 	tristate
 	depends on ARM64 || COMPILE_TEST
 	depends on PCI && PCI_MSI
+	depends on UACCE
 	help
 	  HiSilicon accelerator engines use a common queue management
 	  interface. Specific engine driver may use this module.

Indeed, this driver does not depend on uacce fully, as if there is no uacce, it still can register to kernel crypto.

Quoted 6 lines
Quoted 1 line

Seems that changing uacce config to bool can avoid this problem.

You shouldn't make it a bool. The standard way to solve this is to add this:

	depends on UACCE || UACCE=n

Thanks! Let's fix together with zip Kconfig.

Best,
Zhou

Quoted 3 lines

Cheers,