All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: atmel: remove bogus select
@ 2015-01-28 20:09 Arnd Bergmann
  2015-01-29  7:33 ` Ludovic Desroches
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2015-01-28 20:09 UTC (permalink / raw)
  To: linux-arm-kernel

The Atmel at91 crypto driver unconditionally selects AT_HDMAC,
which results in a Kconfig warning if that driver is not enabled:

warning: (CRYPTO_DEV_ATMEL_AES) selects AT_HDMAC which has unmet direct dependencies (DMADEVICES && ARCH_AT91)

The crypty driver itself does not actually have a dependency
on a particular dma engine, other than this being the one that
is used in at91.

Removing the 'select' gets rid of the warning, with no apparent
downsides.
We should probably enable AT_HDMAC in sama5_defconfig, because
it no longers gets enabled implicitly.

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

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 2fb0fdfc87df..0c411c0aae99 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -348,7 +348,6 @@ config CRYPTO_DEV_ATMEL_AES
 	select CRYPTO_AES
 	select CRYPTO_ALGAPI
 	select CRYPTO_BLKCIPHER
-	select AT_HDMAC
 	help
 	  Some Atmel processors have AES hw accelerator.
 	  Select this if you want to use the Atmel module for

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

* [PATCH] crypto: atmel: remove bogus select
  2015-01-28 20:09 [PATCH] crypto: atmel: remove bogus select Arnd Bergmann
@ 2015-01-29  7:33 ` Ludovic Desroches
  2015-01-29 22:24   ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Desroches @ 2015-01-29  7:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 28, 2015 at 09:09:16PM +0100, Arnd Bergmann wrote:
> The Atmel at91 crypto driver unconditionally selects AT_HDMAC,
> which results in a Kconfig warning if that driver is not enabled:
> 
> warning: (CRYPTO_DEV_ATMEL_AES) selects AT_HDMAC which has unmet direct dependencies (DMADEVICES && ARCH_AT91)
> 
> The crypty driver itself does not actually have a dependency
> on a particular dma engine, other than this being the one that
> is used in at91.
> 
> Removing the 'select' gets rid of the warning, with no apparent
> downsides.

This driver doesn't work without DMA. I think it is the reason why the
select AT_HDMAC was used.

> We should probably enable AT_HDMAC in sama5_defconfig, because
> it no longers gets enabled implicitly.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> index 2fb0fdfc87df..0c411c0aae99 100644
> --- a/drivers/crypto/Kconfig
> +++ b/drivers/crypto/Kconfig
> @@ -348,7 +348,6 @@ config CRYPTO_DEV_ATMEL_AES
>  	select CRYPTO_AES
>  	select CRYPTO_ALGAPI
>  	select CRYPTO_BLKCIPHER
> -	select AT_HDMAC
>  	help
>  	  Some Atmel processors have AES hw accelerator.
>  	  Select this if you want to use the Atmel module for
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH] crypto: atmel: remove bogus select
  2015-01-29  7:33 ` Ludovic Desroches
@ 2015-01-29 22:24   ` Arnd Bergmann
  2015-02-09 16:16     ` Ludovic Desroches
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2015-01-29 22:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 29 January 2015 08:33:28 Ludovic Desroches wrote:
> On Wed, Jan 28, 2015 at 09:09:16PM +0100, Arnd Bergmann wrote:
> > The Atmel at91 crypto driver unconditionally selects AT_HDMAC,
> > which results in a Kconfig warning if that driver is not enabled:
> > 
> > warning: (CRYPTO_DEV_ATMEL_AES) selects AT_HDMAC which has unmet direct dependencies (DMADEVICES && ARCH_AT91)
> > 
> > The crypty driver itself does not actually have a dependency
> > on a particular dma engine, other than this being the one that
> > is used in at91.
> > 
> > Removing the 'select' gets rid of the warning, with no apparent
> > downsides.
> 
> This driver doesn't work without DMA. I think it is the reason why the
> select AT_HDMAC was used.
> 

I understand the intention, but this what was written in Kconfig is
not the correct way to express it.

A lot of drivers require DMA_ENGINE support, but the linux/dmaengine.h
header file provides static inline helpers to make sure that things
still compile if that is disabled, and in the example I mentioned
above, it does build, but clearly cannot work as the real dmaengine
interfaces are not provided by the kernel.

What we could do to express the runtime dependency correctly is to add

	depends on (ARCH_AT91 && AT_HDMAC) || COMPILE_TEST

which would let the driver only be enabled in cases that have a
reasonable chance of working, but still allow it to be built
everywhere else.

	Arnd

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

* [PATCH] crypto: atmel: remove bogus select
  2015-01-29 22:24   ` Arnd Bergmann
@ 2015-02-09 16:16     ` Ludovic Desroches
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Desroches @ 2015-02-09 16:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 29, 2015 at 11:24:32PM +0100, Arnd Bergmann wrote:
> On Thursday 29 January 2015 08:33:28 Ludovic Desroches wrote:
> > On Wed, Jan 28, 2015 at 09:09:16PM +0100, Arnd Bergmann wrote:
> > > The Atmel at91 crypto driver unconditionally selects AT_HDMAC,
> > > which results in a Kconfig warning if that driver is not enabled:
> > > 
> > > warning: (CRYPTO_DEV_ATMEL_AES) selects AT_HDMAC which has unmet direct dependencies (DMADEVICES && ARCH_AT91)
> > > 
> > > The crypty driver itself does not actually have a dependency
> > > on a particular dma engine, other than this being the one that
> > > is used in at91.
> > > 
> > > Removing the 'select' gets rid of the warning, with no apparent
> > > downsides.
> > 
> > This driver doesn't work without DMA. I think it is the reason why the
> > select AT_HDMAC was used.
> > 
> 
> I understand the intention, but this what was written in Kconfig is
> not the correct way to express it.
> 

Sure.

> A lot of drivers require DMA_ENGINE support, but the linux/dmaengine.h
> header file provides static inline helpers to make sure that things
> still compile if that is disabled, and in the example I mentioned
> above, it does build, but clearly cannot work as the real dmaengine
> interfaces are not provided by the kernel.
> 
> What we could do to express the runtime dependency correctly is to add
> 
> 	depends on (ARCH_AT91 && AT_HDMAC) || COMPILE_TEST
> 

I am fine with it, only have to add AT_XDMAC or to introduce something
like HAVE_AT91_DMA.

> which would let the driver only be enabled in cases that have a
> reasonable chance of working, but still allow it to be built
> everywhere else.
> 
> 	Arnd

Ludovic

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

end of thread, other threads:[~2015-02-09 16:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 20:09 [PATCH] crypto: atmel: remove bogus select Arnd Bergmann
2015-01-29  7:33 ` Ludovic Desroches
2015-01-29 22:24   ` Arnd Bergmann
2015-02-09 16:16     ` Ludovic Desroches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.