RE: [EXT] Re: [PATCH] crypto: octeontx2 - Add dependency on NET_VENDOR_MARVELL
From: Srujana Challa <schalla@marvell.com>
Date: 2021-02-01 03:26:37
Also in:
linux-crypto, lkml
Hi Srujana, On Fri, Jan 29, 2021 at 6:53 AM Herbert Xu [off-list ref] wrote:quoted
On Mon, Jan 25, 2021 at 09:41:12AM -0800, Randy Dunlap wrote:quoted
on x86_64: ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_main.o: in function`cptpf_flr_wq_handler':quoted
quoted
otx2_cptpf_main.c:(.text+0x2b): undefined reference to`otx2_mbox_alloc_msg_rsp'quoted
Thanks for the report. The issue is that the crypto driver depends on code that sits under net so if that option is off then you'll end up with these errors. ---8<--- The crypto octeontx2 driver depends on the mbox code in the network tree. It tries to select the MBOX Kconfig option but that option itself depends on many other options which are not selected, e.g., CONFIG_NET_VENDOR_MARVELL. It would be inappropriate to select them all as randomly prompting the user for network options which would oterhwise be disabled just because a crypto driver has been enabled makes no sense. This patch fixes this by adding a dependency on NET_VENDOR_MARVELL. This makes the crypto driver invisible if the network option is off. If the crypto driver must be visible even without the network stack then the shared mbox code should be moved out of drivers/net. Reported-by: Randy Dunlap <redacted> Reported-by: kernel test robot <redacted> Fixes: 5e8ce8334734 ("crypto: marvell - add Marvell OcteonTX2 CPT...") Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>diff --git a/drivers/crypto/marvell/Kconfigb/drivers/crypto/marvell/Kconfig index 2efbd79180ce..a188ad1fadd3 100644--- a/drivers/crypto/marvell/Kconfig +++ b/drivers/crypto/marvell/Kconfig@@ -41,6 +41,7 @@ config CRYPTO_DEV_OCTEONTX2_CPT depends on ARM64 || COMPILE_TESTWhy the dependency on ARM64? Perhaps this should be a dependency on ARCH_THUNDER instead?
This driver depends on ARM64 because the silicon is ARM64 based and for operations like lmtst ([PATCH v10,net-next,1/3] octeontx2-pf: move lmt flush to include/linux/soc) we use arm64 assembly instructions.
I see this driver is a PCI driver. Can the PCI device be present on a generic PCI(e) expansion card, or is it always embedded in an Octeon SoC? Thanks!
This PCI device is present only on OcteonTx2 SoC and not as a independent PCIe endpoint.
quoted
depends on PCI_MSI && 64BIT depends on CRYPTO_LIB_AES + depends on NET_VENDOR_MARVELL select OCTEONTX2_MBOX select CRYPTO_DEV_MARVELL select CRYPTO_SKCIPHER -- Email: Herbert Xu [off-list ref] Home Page: https://urldefense.proofpoint.com/v2/url?u=http-3A__gondor.apana.org.a u_-7Eherbert_&d=DwIBaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=Fj4OoD5hcKFpANh TWdwQquoted
zjT1Jpf7veC5263T47JVpnc&m=dRYGbkafMlmqjN6rLZeFXL0zOADTNp6sYkm-lHW4_cA"ed
s=sbjI8As-bTTHmNW8JKq01AP2qaDCAWuVmHAOVz7tEGI&e= PGP Key: https://urldefense.proofpoint.com/v2/url?u=http-3A__gondor.apana.org.a u_-7Eherbert_pubkey.txt&d=DwIBaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=Fj4OoD 5hcKquoted
FpANhTWdwQzjT1Jpf7veC5263T47JVpnc&m=dRYGbkafMlmqjN6rLZeFXL0zOA DTNp6sYkquoted
m-lHW4_cA&s=Qv1MXxxyejkh_qp7LaT0xDiOL1kNRvo4BP4Lz1gQMJI&e=Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux- m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds