* linux-next-20210125: drivers/crypto/marvell/octeontx2/ build errors
@ 2021-01-25 17:41 Randy Dunlap
2021-01-29 5:48 ` [PATCH] crypto: octeontx2 - Add dependency on NET_VENDOR_MARVELL Herbert Xu
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2021-01-25 17:41 UTC (permalink / raw)
To: LKML, linux-next@vger.kernel.org, Stephen Rothwell
Cc: Linux Crypto Mailing List, Boris Brezillon, Arnaud Ebalard,
Srujana Challa, Herbert Xu
[-- Attachment #1: Type: text/plain, Size: 4732 bytes --]
on x86_64:
ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_main.o: in function `cptpf_flr_wq_handler':
otx2_cptpf_main.c:(.text+0x2b): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_main.o: in function `otx2_cptpf_probe':
otx2_cptpf_main.c:(.text+0x4ec): undefined reference to `otx2_mbox_init'
ld: otx2_cptpf_main.c:(.text+0x68c): undefined reference to `otx2_mbox_destroy'
ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_main.o: in function `cptpf_sriov_disable':
otx2_cptpf_main.c:(.text+0x89b): undefined reference to `otx2_mbox_destroy'
ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_main.o: in function `otx2_cptpf_sriov_configure':
otx2_cptpf_main.c:(.text+0x976): undefined reference to `otx2_mbox_init'
ld: otx2_cptpf_main.c:(.text+0xcb8): undefined reference to `otx2_mbox_destroy'
ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_main.o: in function `otx2_cptpf_remove':
otx2_cptpf_main.c:(.text+0xe63): undefined reference to `otx2_mbox_destroy'
ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.o: in function `otx2_cptpf_vfpf_mbox_handler':
otx2_cptpf_mbox.c:(.text+0x1ad): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: otx2_cptpf_mbox.c:(.text+0x205): undefined reference to `otx2_mbox_msg_send'
ld: otx2_cptpf_mbox.c:(.text+0x211): undefined reference to `otx2_mbox_wait_for_rsp'
ld: otx2_cptpf_mbox.c:(.text+0x27b): undefined reference to `otx2_reply_invalid_msg'
ld: otx2_cptpf_mbox.c:(.text+0x288): undefined reference to `otx2_mbox_msg_send'
ld: otx2_cptpf_mbox.c:(.text+0x2cf): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: otx2_cptpf_mbox.c:(.text+0x307): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: otx2_cptpf_mbox.c:(.text+0x35d): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.o: in function `otx2_cptpf_afpf_mbox_handler':
otx2_cptpf_mbox.c:(.text+0x4db): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.o: in function `otx2_cptpf_vfpf_mbox_handler':
otx2_cptpf_mbox.c:(.text+0x3d9): undefined reference to `otx2_mbox_msg_send'
ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.o: in function `otx2_cptpf_afpf_mbox_handler':
otx2_cptpf_mbox.c:(.text+0x61b): undefined reference to `otx2_mbox_reset'
ld: drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.o: in function `otx2_cpt_send_mbox_msg':
otx2_cpt_mbox_common.c:(.text+0xf): undefined reference to `otx2_mbox_msg_send'
ld: otx2_cpt_mbox_common.c:(.text+0x19): undefined reference to `otx2_mbox_wait_for_rsp'
ld: drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.o: in function `otx2_cpt_send_ready_msg':
otx2_cpt_mbox_common.c:(.text+0x95): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.o: in function `otx2_cpt_add_read_af_reg':
otx2_cpt_mbox_common.c:(.text+0x11a): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.o: in function `otx2_cpt_add_write_af_reg':
otx2_cpt_mbox_common.c:(.text+0x17a): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.o: in function `otx2_cpt_attach_rscrs_msg':
otx2_cpt_mbox_common.c:(.text+0x25c): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.o: in function `otx2_cpt_detach_rsrcs_msg':
otx2_cpt_mbox_common.c:(.text+0x2dc): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.o:otx2_cpt_mbox_common.c:(.text+0x362): more undefined references to `otx2_mbox_alloc_msg_rsp' follow
ld: drivers/crypto/marvell/octeontx2/otx2_cptvf_main.o: in function `otx2_cptvf_remove':
otx2_cptvf_main.c:(.text+0x1e9): undefined reference to `otx2_mbox_destroy'
ld: drivers/crypto/marvell/octeontx2/otx2_cptvf_main.o: in function `otx2_cptvf_probe':
otx2_cptvf_main.c:(.text+0x3fe): undefined reference to `otx2_mbox_init'
ld: otx2_cptvf_main.c:(.text+0x507): undefined reference to `otx2_mbox_destroy'
ld: drivers/crypto/marvell/octeontx2/otx2_cptvf_mbox.o: in function `otx2_cptvf_send_eng_grp_num_msg':
otx2_cptvf_mbox.c:(.text+0x287): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: drivers/crypto/marvell/octeontx2/otx2_cptvf_mbox.o: in function `otx2_cptvf_send_kvf_limits_msg':
otx2_cptvf_mbox.c:(.text+0x302): undefined reference to `otx2_mbox_alloc_msg_rsp'
ld: drivers/crypto/marvell/octeontx2/otx2_cptvf_mbox.o: in function `otx2_cptvf_pfvf_mbox_handler':
otx2_cptvf_mbox.c:(.text+0x14f): undefined reference to `otx2_mbox_reset'
Full randconfig file is attached.
--
~Randy
Reported-by: Randy Dunlap <rdunlap@infradead.org>
[-- Attachment #2: config-r7396.gz --]
[-- Type: application/gzip, Size: 33786 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] crypto: octeontx2 - Add dependency on NET_VENDOR_MARVELL
2021-01-25 17:41 linux-next-20210125: drivers/crypto/marvell/octeontx2/ build errors Randy Dunlap
@ 2021-01-29 5:48 ` Herbert Xu
2021-01-29 7:04 ` Randy Dunlap
[not found] ` <CAMuHMdWLnB3jUK=1s4bhfJDh-N2kUBuouZg8VSQe57+dL2cGpg@mail.gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Herbert Xu @ 2021-01-29 5:48 UTC (permalink / raw)
To: Randy Dunlap
Cc: LKML, linux-next@vger.kernel.org, Stephen Rothwell,
Linux Crypto Mailing List, Boris Brezillon, Arnaud Ebalard,
Srujana Challa, kernel test robot
On Mon, Jan 25, 2021 at 09:41:12AM -0800, Randy Dunlap wrote:
> on x86_64:
>
> ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_main.o: in function `cptpf_flr_wq_handler':
> otx2_cptpf_main.c:(.text+0x2b): undefined reference to `otx2_mbox_alloc_msg_rsp'
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 <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 5e8ce8334734 ("crypto: marvell - add Marvell OcteonTX2 CPT...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/drivers/crypto/marvell/Kconfig b/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_TEST
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 <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 related [flat|nested] 4+ messages in thread
* Re: [PATCH] crypto: octeontx2 - Add dependency on NET_VENDOR_MARVELL
2021-01-29 5:48 ` [PATCH] crypto: octeontx2 - Add dependency on NET_VENDOR_MARVELL Herbert Xu
@ 2021-01-29 7:04 ` Randy Dunlap
[not found] ` <CAMuHMdWLnB3jUK=1s4bhfJDh-N2kUBuouZg8VSQe57+dL2cGpg@mail.gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2021-01-29 7:04 UTC (permalink / raw)
To: Herbert Xu
Cc: LKML, linux-next@vger.kernel.org, Stephen Rothwell,
Linux Crypto Mailing List, Boris Brezillon, Arnaud Ebalard,
Srujana Challa, kernel test robot
On 1/28/21 9:48 PM, Herbert Xu wrote:
> On Mon, Jan 25, 2021 at 09:41:12AM -0800, Randy Dunlap wrote:
>> on x86_64:
>>
>> ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_main.o: in function `cptpf_flr_wq_handler':
>> otx2_cptpf_main.c:(.text+0x2b): undefined reference to `otx2_mbox_alloc_msg_rsp'
>
> 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 <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 5e8ce8334734 ("crypto: marvell - add Marvell OcteonTX2 CPT...")
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Thanks, Herbert.
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
> diff --git a/drivers/crypto/marvell/Kconfig b/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_TEST
> 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
>
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [EXT] Re: [PATCH] crypto: octeontx2 - Add dependency on NET_VENDOR_MARVELL
[not found] ` <CAMuHMdWLnB3jUK=1s4bhfJDh-N2kUBuouZg8VSQe57+dL2cGpg@mail.gmail.com>
@ 2021-02-01 3:24 ` Srujana Challa
0 siblings, 0 replies; 4+ messages in thread
From: Srujana Challa @ 2021-02-01 3:24 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Randy Dunlap, LKML, linux-next@vger.kernel.org, Stephen Rothwell,
Linux Crypto Mailing List, Boris Brezillon, Arnaud Ebalard,
kernel test robot, Herbert Xu
> Hi Srujana,
>
> On Fri, Jan 29, 2021 at 6:53 AM Herbert Xu <herbert@gondor.apana.org.au>
> wrote:
> > On Mon, Jan 25, 2021 at 09:41:12AM -0800, Randy Dunlap wrote:
> > > on x86_64:
> > >
> > > ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_main.o: in function
> `cptpf_flr_wq_handler':
> > > otx2_cptpf_main.c:(.text+0x2b): undefined reference to
> `otx2_mbox_alloc_msg_rsp'
> >
> > 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 <rdunlap@infradead.org>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Fixes: 5e8ce8334734 ("crypto: marvell - add Marvell OcteonTX2 CPT...")
> > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> >
> > diff --git a/drivers/crypto/marvell/Kconfig
> > b/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_TEST
>
> Why 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.
> > 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 <herbert@gondor.apana.org.au> Home Page:
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__gondor.apana.org.a
> > u_-
> 7Eherbert_&d=DwIBaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=Fj4OoD5hcKFpANh
> TWdwQ
> > zjT1Jpf7veC5263T47JVpnc&m=dRYGbkafMlmqjN6rLZeFXL0zOADTNp6sYkm-
> lHW4_cA&
> > 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
> 5hcK
> >
> FpANhTWdwQzjT1Jpf7veC5263T47JVpnc&m=dRYGbkafMlmqjN6rLZeFXL0zOA
> DTNp6sYk
> > 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-01 3:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-25 17:41 linux-next-20210125: drivers/crypto/marvell/octeontx2/ build errors Randy Dunlap
2021-01-29 5:48 ` [PATCH] crypto: octeontx2 - Add dependency on NET_VENDOR_MARVELL Herbert Xu
2021-01-29 7:04 ` Randy Dunlap
[not found] ` <CAMuHMdWLnB3jUK=1s4bhfJDh-N2kUBuouZg8VSQe57+dL2cGpg@mail.gmail.com>
2021-02-01 3:24 ` [EXT] " Srujana Challa
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).