* [PATCH] crypto: qcom: add HW_RANDOM dependency
@ 2023-10-16 20:02 Arnd Bergmann
2023-10-17 3:27 ` Om Prakash Singh
2023-10-17 7:13 ` Neil Armstrong
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2023-10-16 20:02 UTC (permalink / raw)
To: Herbert Xu, David S. Miller, Om Prakash Singh, Neil Armstrong,
Bjorn Andersson
Cc: Arnd Bergmann, linux-crypto, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The driver now calls into the hwrng subsystem and causes a link failure if that
is not reachable:
x86_64-linux-ld: vmlinux.o: in function `qcom_rng_probe':
qcom-rng.c:(.text+0xfefc7e): undefined reference to `devm_hwrng_register'
Add a Kconfig dependency as we have for the pure hw_random drivers. I see
that there are some other crypto drivers that instead use 'select HW_RANDOM',
but those seem to be mistakes as that may lead to circular dependencies,
and a simple driver should not force-enable an entire subsytem.
Fixes: f29cd5bb64c25 ("crypto: qcom-rng - Add hw_random interface support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/crypto/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index c761952f0dc6d..79c3bb9c99c3b 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -601,6 +601,7 @@ config CRYPTO_DEV_QCE_SW_MAX_LEN
config CRYPTO_DEV_QCOM_RNG
tristate "Qualcomm Random Number Generator Driver"
depends on ARCH_QCOM || COMPILE_TEST
+ depends on HW_RANDOM
select CRYPTO_RNG
help
This driver provides support for the Random Number
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] crypto: qcom: add HW_RANDOM dependency
2023-10-16 20:02 [PATCH] crypto: qcom: add HW_RANDOM dependency Arnd Bergmann
@ 2023-10-17 3:27 ` Om Prakash Singh
2023-10-17 7:13 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Om Prakash Singh @ 2023-10-17 3:27 UTC (permalink / raw)
To: Arnd Bergmann, Herbert Xu, David S. Miller, Neil Armstrong,
Bjorn Andersson
Cc: Arnd Bergmann, linux-crypto, linux-kernel
On 10/17/2023 1:32 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The driver now calls into the hwrng subsystem and causes a link failure if that
> is not reachable:
>
> x86_64-linux-ld: vmlinux.o: in function `qcom_rng_probe':
> qcom-rng.c:(.text+0xfefc7e): undefined reference to `devm_hwrng_register'
>
> Add a Kconfig dependency as we have for the pure hw_random drivers. I see
> that there are some other crypto drivers that instead use 'select HW_RANDOM',
> but those seem to be mistakes as that may lead to circular dependencies,
> and a simple driver should not force-enable an entire subsytem.
>
> Fixes: f29cd5bb64c25 ("crypto: qcom-rng - Add hw_random interface support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
Reviewed-by: Om Prakash Singh <quic_omprsing@quicinc.com>
> drivers/crypto/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> index c761952f0dc6d..79c3bb9c99c3b 100644
> --- a/drivers/crypto/Kconfig
> +++ b/drivers/crypto/Kconfig
> @@ -601,6 +601,7 @@ config CRYPTO_DEV_QCE_SW_MAX_LEN
> config CRYPTO_DEV_QCOM_RNG
> tristate "Qualcomm Random Number Generator Driver"
> depends on ARCH_QCOM || COMPILE_TEST
> + depends on HW_RANDOM
> select CRYPTO_RNG
> help
> This driver provides support for the Random Number
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] crypto: qcom: add HW_RANDOM dependency
2023-10-16 20:02 [PATCH] crypto: qcom: add HW_RANDOM dependency Arnd Bergmann
2023-10-17 3:27 ` Om Prakash Singh
@ 2023-10-17 7:13 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2023-10-17 7:13 UTC (permalink / raw)
To: Arnd Bergmann, Herbert Xu, David S. Miller, Om Prakash Singh,
Bjorn Andersson
Cc: Arnd Bergmann, linux-crypto, linux-kernel
On 16/10/2023 22:02, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The driver now calls into the hwrng subsystem and causes a link failure if that
> is not reachable:
>
> x86_64-linux-ld: vmlinux.o: in function `qcom_rng_probe':
> qcom-rng.c:(.text+0xfefc7e): undefined reference to `devm_hwrng_register'
>
> Add a Kconfig dependency as we have for the pure hw_random drivers. I see
> that there are some other crypto drivers that instead use 'select HW_RANDOM',
> but those seem to be mistakes as that may lead to circular dependencies,
> and a simple driver should not force-enable an entire subsytem.
>
> Fixes: f29cd5bb64c25 ("crypto: qcom-rng - Add hw_random interface support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/crypto/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> index c761952f0dc6d..79c3bb9c99c3b 100644
> --- a/drivers/crypto/Kconfig
> +++ b/drivers/crypto/Kconfig
> @@ -601,6 +601,7 @@ config CRYPTO_DEV_QCE_SW_MAX_LEN
> config CRYPTO_DEV_QCOM_RNG
> tristate "Qualcomm Random Number Generator Driver"
> depends on ARCH_QCOM || COMPILE_TEST
> + depends on HW_RANDOM
> select CRYPTO_RNG
> help
> This driver provides support for the Random Number
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-17 7:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-16 20:02 [PATCH] crypto: qcom: add HW_RANDOM dependency Arnd Bergmann
2023-10-17 3:27 ` Om Prakash Singh
2023-10-17 7:13 ` Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox