linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: nx - tweak Makefile dependencies
@ 2015-05-25  4:45 Cyril Bur
  2015-05-27  9:50 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Cyril Bur @ 2015-05-25  4:45 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Marcelo Henrique Cerri, Fionnuala Gunter, linux-crypto,
	linuxppc-dev

Selecting CRYPTO_DEV_NX causes a conditional include of nx/Kconfig but
options within nx/Kconfig do not depend on it. The included options should
depend on CRYPTO_DEV_NX since currently CRYPTO_DEV_NX cannot be built for
little endian. While Kconfig appears to understand this convoluted
dependency situation, it isn't explicitly stated.

This patch addresses the missing dependencies for CRYPTO_DEV_NX_ENCRYPT and
CRYPTO_DEV_NX_COMPRESS which should depend on CRYPTO_DEV_NX. It also makes
more sense to put all three options into the nx/Kconfig file and have the
file included unconditionally.

CC: Marcelo Henrique Cerri <mhcerri@linux.vnet.ibm.com>
CC: Fionnuala Gunter <fin@linux.vnet.ibm.com>
CC: linux-crypto@vger.kernel.org
CC: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
---
 drivers/crypto/Kconfig    | 11 +----------
 drivers/crypto/nx/Kconfig | 11 +++++++++--
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 033c0c8..cc96a7d 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -311,16 +311,7 @@ config CRYPTO_DEV_S5P
 	  Select this to offload Samsung S5PV210 or S5PC110, Exynos from AES
 	  algorithms execution.
 
-config CRYPTO_DEV_NX
-	bool "Support for IBM Power7+ in-Nest cryptographic acceleration"
-	depends on PPC64 && IBMVIO && !CPU_LITTLE_ENDIAN
-	default n
-	help
-	  Support for Power7+ in-Nest cryptographic acceleration.
-
-if CRYPTO_DEV_NX
-	source "drivers/crypto/nx/Kconfig"
-endif
+source "drivers/crypto/nx/Kconfig"
 
 config CRYPTO_DEV_UX500
 	tristate "Driver for ST-Ericsson UX500 crypto hardware acceleration"
diff --git a/drivers/crypto/nx/Kconfig b/drivers/crypto/nx/Kconfig
index f826166..0726f12 100644
--- a/drivers/crypto/nx/Kconfig
+++ b/drivers/crypto/nx/Kconfig
@@ -1,6 +1,13 @@
+config CRYPTO_DEV_NX
+	bool "Support for IBM Power7+ in-Nest cryptographic acceleration"
+	depends on PPC64 && IBMVIO && !CPU_LITTLE_ENDIAN
+	default n
+	help
+	  Support for Power7+ in-Nest cryptographic acceleration.
+
 config CRYPTO_DEV_NX_ENCRYPT
 	tristate "Encryption acceleration support"
-	depends on PPC64 && IBMVIO
+	depends on CRYPTO_DEV_NX
 	default y
 	select CRYPTO_AES
 	select CRYPTO_CBC
@@ -18,7 +25,7 @@ config CRYPTO_DEV_NX_ENCRYPT
 
 config CRYPTO_DEV_NX_COMPRESS
 	tristate "Compression acceleration support"
-	depends on PPC64 && IBMVIO
+	depends on CRYPTO_DEV_NX
 	default y
 	help
 	  Support for Power7+ in-Nest compression acceleration. This
-- 
1.9.1

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

* Re: [PATCH] crypto: nx - tweak Makefile dependencies
  2015-05-25  4:45 [PATCH] crypto: nx - tweak Makefile dependencies Cyril Bur
@ 2015-05-27  9:50 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2015-05-27  9:50 UTC (permalink / raw)
  To: Cyril Bur
  Cc: Marcelo Henrique Cerri, Fionnuala Gunter, linux-crypto,
	linuxppc-dev

On Mon, May 25, 2015 at 02:45:16PM +1000, Cyril Bur wrote:
> Selecting CRYPTO_DEV_NX causes a conditional include of nx/Kconfig but
> options within nx/Kconfig do not depend on it. The included options should
> depend on CRYPTO_DEV_NX since currently CRYPTO_DEV_NX cannot be built for
> little endian. While Kconfig appears to understand this convoluted
> dependency situation, it isn't explicitly stated.
> 
> This patch addresses the missing dependencies for CRYPTO_DEV_NX_ENCRYPT and
> CRYPTO_DEV_NX_COMPRESS which should depend on CRYPTO_DEV_NX. It also makes
> more sense to put all three options into the nx/Kconfig file and have the
> file included unconditionally.
> 
> CC: Marcelo Henrique Cerri <mhcerri@linux.vnet.ibm.com>
> CC: Fionnuala Gunter <fin@linux.vnet.ibm.com>
> CC: linux-crypto@vger.kernel.org
> CC: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Cyril Bur <cyrilbur@gmail.com>

Your patch doesn't apply against the cryptodev tree.  Please rebase
it.

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] 2+ messages in thread

end of thread, other threads:[~2015-05-27  9:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-25  4:45 [PATCH] crypto: nx - tweak Makefile dependencies Cyril Bur
2015-05-27  9:50 ` 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).