Skip to contentSkip to conversation

crypto: atmel: remove bogus select

PATCH New Arnd Bergmann 2 participants 4 messages Jan 28, 2015 – Feb 9, 2015 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: atmel: remove bogus select

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.

drivers/crypto/Kconfig +0 -1
index 2fb0fdfc87df..0c411c0aae99 100644
@@ -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
#1 lore raw

PATCH 1/1 crypto: atmel: remove bogus select

Quoted 11 lines · Arnd Bergmann

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.

Quoted 23 lines

We should probably enable AT_HDMAC in sama5_defconfig, because it no longers gets enabled implicitly.

drivers/crypto/Kconfig +0 -1
index 2fb0fdfc87df..0c411c0aae99 100644
@@ -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

#2 lore raw

PATCH 1/1 crypto: atmel: remove bogus select

Quoted 10 lines · On Thursday 29 January 2015 08:33:28 Ludovic Desroches wrote:
Quoted 9 lines · Arnd Bergmann

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.

Quoted 6 lines
Quoted 2 lines

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

#3 lore raw

PATCH 1/1 crypto: atmel: remove bogus select

Quoted 14 lines · Arnd Bergmann
Quoted 13 lines · On Thursday 29 January 2015 08:33:28 Ludovic Desroches wrote:
Quoted 11 lines · Arnd Bergmann

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.

Quoted 7 lines
Quoted 3 lines

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.

Quoted 10 lines

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.

Quoted 5 lines

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