linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "Horia Geantă" <horia.geanta@nxp.com>,
	"Aymen Sghaier" <aymen.sghaier@nxp.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] crypto: caam/qi2 - add a CRYPTO_DEV_FSL_CAAM dependency
Date: Thu, 20 Dec 2018 16:28:08 +0100	[thread overview]
Message-ID: <20181220152815.3613164-1-arnd@arndb.de> (raw)

My previous bugfix was incomplete, we still have a broken kernel
with CRYPTO_DEV_FSL_CAAM=m and CRYPTO_DEV_FSL_DPAA2_CAAM=y:

drivers/crypto/caam/caamalg_desc.o: In function `cnstr_shdsc_aead_null_encap':
caamalg_desc.c:(.text+0x14): undefined reference to `caam_little_end'
drivers/crypto/caam/caamalg_desc.o: In function `cnstr_shdsc_aead_null_encap':
caamalg_desc.c:(.text+0x310): undefined reference to `caam_imx'
caamalg_desc.c:(.text+0x4a8): undefined reference to `caam_little_end'
drivers/crypto/caam/caamalg_desc.o: In function `cnstr_shdsc_aead_null_encap':
caamalg_desc.c:(.text+0x664): undefined reference to `caam_imx'

Everything is fine for the other combinations: if both are loadable
modules, or both are built-in, the flags work as expected, also if
only one of the two is enabled.

Add a dependency to enforce using one of the working configurations.
Overall, I'm still not happy with that dependency, but for now
it documents what the code requires.

Fixes: 52813ab24959 ("crypto: caam/qi2 - avoid double export")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/crypto/caam/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/caam/Kconfig b/drivers/crypto/caam/Kconfig
index c4b1cade55c1..4dff65e518e7 100644
--- a/drivers/crypto/caam/Kconfig
+++ b/drivers/crypto/caam/Kconfig
@@ -158,6 +158,7 @@ config CRYPTO_DEV_FSL_DPAA2_CAAM
 	tristate "QorIQ DPAA2 CAAM (DPSECI) driver"
 	depends on FSL_MC_DPIO
 	depends on NETDEVICES
+	depends on CRYPTO_DEV_FSL_CAAM || !CRYPTO_DEV_FSL_CAAM
 	select CRYPTO_DEV_FSL_CAAM_COMMON
 	select CRYPTO_BLKCIPHER
 	select CRYPTO_AUTHENC
-- 
2.20.0


             reply	other threads:[~2018-12-20 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 15:28 Arnd Bergmann [this message]
2018-12-20 21:27 ` [PATCH] crypto: caam/qi2 - add a CRYPTO_DEV_FSL_CAAM dependency Horia Geanta
2019-01-10 13:09   ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181220152815.3613164-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=aymen.sghaier@nxp.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).