linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] crypto: hisilicon - Fix build error
@ 2020-03-30  8:36 YueHaibing
  2020-03-30  9:03 ` Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: YueHaibing @ 2020-03-30  8:36 UTC (permalink / raw)
  To: herbert, davem, wangzhou1, Jonathan.Cameron, xuzaibo, shiju.jose,
	ebiggers, yaohongbo, maowenan, arnd
  Cc: linux-crypto, linux-kernel, YueHaibing

When UACCE is m, CRYPTO_DEV_HISI_QM cannot be built-in.
But CRYPTO_DEV_HISI_QM is selected by CRYPTO_DEV_HISI_SEC2
and CRYPTO_DEV_HISI_HPRE unconditionally, which may leads this:

drivers/crypto/hisilicon/qm.o: In function 'qm_alloc_uacce':
drivers/crypto/hisilicon/qm.c:1579: undefined reference to 'uacce_alloc'

Add Kconfig dependency to enforce usable configurations.

Fixes: 47c16b449921 ("crypto: hisilicon - qm depends on UACCE")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/crypto/hisilicon/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/hisilicon/Kconfig b/drivers/crypto/hisilicon/Kconfig
index 095850d01dcc..f09c6cf7823e 100644
--- a/drivers/crypto/hisilicon/Kconfig
+++ b/drivers/crypto/hisilicon/Kconfig
@@ -27,6 +27,7 @@ config CRYPTO_DEV_HISI_SEC2
 	select CRYPTO_SHA256
 	select CRYPTO_SHA512
 	depends on PCI && PCI_MSI
+	depends on UACCE || UACCE=n
 	depends on ARM64 || (COMPILE_TEST && 64BIT)
 	help
 	  Support for HiSilicon SEC Engine of version 2 in crypto subsystem.
@@ -58,6 +59,7 @@ config CRYPTO_DEV_HISI_ZIP
 config CRYPTO_DEV_HISI_HPRE
 	tristate "Support for HISI HPRE accelerator"
 	depends on PCI && PCI_MSI
+	depends on UACCE || UACCE=n
 	depends on ARM64 || (COMPILE_TEST && 64BIT)
 	select CRYPTO_DEV_HISI_QM
 	select CRYPTO_DH
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] crypto: hisilicon - Fix build error
  2020-03-30  8:36 [PATCH -next] crypto: hisilicon - Fix build error YueHaibing
@ 2020-03-30  9:03 ` Arnd Bergmann
  2020-03-30 13:36 ` Zhou Wang
  2020-04-03  4:41 ` Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2020-03-30  9:03 UTC (permalink / raw)
  To: YueHaibing
  Cc: Herbert Xu, David Miller, Zhou Wang, Jonathan Cameron, Zaibo Xu,
	Shiju Jose, Eric Biggers, Hongbo Yao, Mao Wenan,
	open list:HARDWARE RANDOM NUMBER GENERATOR CORE, linux-kernel

On Mon, Mar 30, 2020 at 10:39 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> When UACCE is m, CRYPTO_DEV_HISI_QM cannot be built-in.
> But CRYPTO_DEV_HISI_QM is selected by CRYPTO_DEV_HISI_SEC2
> and CRYPTO_DEV_HISI_HPRE unconditionally, which may leads this:
>
> drivers/crypto/hisilicon/qm.o: In function 'qm_alloc_uacce':
> drivers/crypto/hisilicon/qm.c:1579: undefined reference to 'uacce_alloc'
>
> Add Kconfig dependency to enforce usable configurations.
>
> Fixes: 47c16b449921 ("crypto: hisilicon - qm depends on UACCE")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Looks correct to me (based on having fixed many similar issues is other
places, not because of specific knowledge on this driver).

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

> ---
>  drivers/crypto/hisilicon/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/crypto/hisilicon/Kconfig b/drivers/crypto/hisilicon/Kconfig
> index 095850d01dcc..f09c6cf7823e 100644
> --- a/drivers/crypto/hisilicon/Kconfig
> +++ b/drivers/crypto/hisilicon/Kconfig
> @@ -27,6 +27,7 @@ config CRYPTO_DEV_HISI_SEC2
>         select CRYPTO_SHA256
>         select CRYPTO_SHA512
>         depends on PCI && PCI_MSI
> +       depends on UACCE || UACCE=n
>         depends on ARM64 || (COMPILE_TEST && 64BIT)
>         help
>           Support for HiSilicon SEC Engine of version 2 in crypto subsystem.
> @@ -58,6 +59,7 @@ config CRYPTO_DEV_HISI_ZIP
>  config CRYPTO_DEV_HISI_HPRE
>         tristate "Support for HISI HPRE accelerator"
>         depends on PCI && PCI_MSI
> +       depends on UACCE || UACCE=n
>         depends on ARM64 || (COMPILE_TEST && 64BIT)
>         select CRYPTO_DEV_HISI_QM
>         select CRYPTO_DH
> --
> 2.17.1
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] crypto: hisilicon - Fix build error
  2020-03-30  8:36 [PATCH -next] crypto: hisilicon - Fix build error YueHaibing
  2020-03-30  9:03 ` Arnd Bergmann
@ 2020-03-30 13:36 ` Zhou Wang
  2020-04-03  4:41 ` Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: Zhou Wang @ 2020-03-30 13:36 UTC (permalink / raw)
  To: YueHaibing, herbert, davem, Jonathan.Cameron, xuzaibo,
	shiju.jose, ebiggers, yaohongbo, maowenan, arnd
  Cc: linux-crypto, linux-kernel

On 2020/3/30 16:36, YueHaibing wrote:
> When UACCE is m, CRYPTO_DEV_HISI_QM cannot be built-in.
> But CRYPTO_DEV_HISI_QM is selected by CRYPTO_DEV_HISI_SEC2
> and CRYPTO_DEV_HISI_HPRE unconditionally, which may leads this:
> 
> drivers/crypto/hisilicon/qm.o: In function 'qm_alloc_uacce':
> drivers/crypto/hisilicon/qm.c:1579: undefined reference to 'uacce_alloc'
> 
> Add Kconfig dependency to enforce usable configurations.
> 
> Fixes: 47c16b449921 ("crypto: hisilicon - qm depends on UACCE")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Forgot to do the same thing like ZIP. Thanks for fixing this :)
so Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>

Best,
Zhou

> ---
>  drivers/crypto/hisilicon/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/crypto/hisilicon/Kconfig b/drivers/crypto/hisilicon/Kconfig
> index 095850d01dcc..f09c6cf7823e 100644
> --- a/drivers/crypto/hisilicon/Kconfig
> +++ b/drivers/crypto/hisilicon/Kconfig
> @@ -27,6 +27,7 @@ config CRYPTO_DEV_HISI_SEC2
>  	select CRYPTO_SHA256
>  	select CRYPTO_SHA512
>  	depends on PCI && PCI_MSI
> +	depends on UACCE || UACCE=n
>  	depends on ARM64 || (COMPILE_TEST && 64BIT)
>  	help
>  	  Support for HiSilicon SEC Engine of version 2 in crypto subsystem.
> @@ -58,6 +59,7 @@ config CRYPTO_DEV_HISI_ZIP
>  config CRYPTO_DEV_HISI_HPRE
>  	tristate "Support for HISI HPRE accelerator"
>  	depends on PCI && PCI_MSI
> +	depends on UACCE || UACCE=n
>  	depends on ARM64 || (COMPILE_TEST && 64BIT)
>  	select CRYPTO_DEV_HISI_QM
>  	select CRYPTO_DH
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] crypto: hisilicon - Fix build error
  2020-03-30  8:36 [PATCH -next] crypto: hisilicon - Fix build error YueHaibing
  2020-03-30  9:03 ` Arnd Bergmann
  2020-03-30 13:36 ` Zhou Wang
@ 2020-04-03  4:41 ` Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2020-04-03  4:41 UTC (permalink / raw)
  To: YueHaibing
  Cc: davem, wangzhou1, Jonathan.Cameron, xuzaibo, shiju.jose,
	ebiggers, yaohongbo, maowenan, arnd, linux-crypto, linux-kernel

On Mon, Mar 30, 2020 at 04:36:43PM +0800, YueHaibing wrote:
> When UACCE is m, CRYPTO_DEV_HISI_QM cannot be built-in.
> But CRYPTO_DEV_HISI_QM is selected by CRYPTO_DEV_HISI_SEC2
> and CRYPTO_DEV_HISI_HPRE unconditionally, which may leads this:
> 
> drivers/crypto/hisilicon/qm.o: In function 'qm_alloc_uacce':
> drivers/crypto/hisilicon/qm.c:1579: undefined reference to 'uacce_alloc'
> 
> Add Kconfig dependency to enforce usable configurations.
> 
> Fixes: 47c16b449921 ("crypto: hisilicon - qm depends on UACCE")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/crypto/hisilicon/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-03  4:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30  8:36 [PATCH -next] crypto: hisilicon - Fix build error YueHaibing
2020-03-30  9:03 ` Arnd Bergmann
2020-03-30 13:36 ` Zhou Wang
2020-04-03  4:41 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).