linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: cavium: fix Kconfig dependencies
@ 2017-02-14 17:07 Arnd Bergmann
  2017-02-14 17:09 ` David Daney
  2017-02-15  5:35 ` Herbert Xu
  0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2017-02-14 17:07 UTC (permalink / raw)
  To: George Cherian, Herbert Xu, David S. Miller
  Cc: Arnd Bergmann, David Daney, linux-crypto, linux-kernel

The driver fails to build if MSI support is disabled:

In file included from /git/arm-soc/drivers/crypto/cavium/cpt/cptpf_main.c:18:0:
drivers/crypto/cavium/cpt/cptpf.h:57:20: error: array type has incomplete element type 'struct msix_entry'
  struct msix_entry msix_entries[CPT_PF_MSIX_VECTORS];
                    ^~~~~~~~~~~~
drivers/crypto/cavium/cpt/cptpf_main.c: In function 'cpt_enable_msix':
drivers/crypto/cavium/cpt/cptpf_main.c:344:8: error: implicit declaration of function 'pci_enable_msix';did you mean 'cpt_enable_msix'? [-Werror=implicit-function-declaration]

On the other hand, it doesn't seem to have any build dependency on ARCH_THUNDER,
so let's allow compile-testing to catch this kind of problem more easily.
The 64-bit dependency is needed for the use of readq/writeq.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/crypto/cavium/cpt/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/cavium/cpt/Kconfig b/drivers/crypto/cavium/cpt/Kconfig
index 247f1cbbefc1..cbd51b1aa046 100644
--- a/drivers/crypto/cavium/cpt/Kconfig
+++ b/drivers/crypto/cavium/cpt/Kconfig
@@ -7,7 +7,8 @@ config CRYPTO_DEV_CPT
 
 config CAVIUM_CPT
 	tristate "Cavium Cryptographic Accelerator driver"
-	depends on ARCH_THUNDER
+	depends on ARCH_THUNDER || COMPILE_TEST
+	depends on PCI_MSI && 64BIT
 	select CRYPTO_DEV_CPT
 	help
 	  Support for Cavium CPT block found in octeon-tx series of
-- 
2.9.0

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

* Re: [PATCH] crypto: cavium: fix Kconfig dependencies
  2017-02-14 17:07 [PATCH] crypto: cavium: fix Kconfig dependencies Arnd Bergmann
@ 2017-02-14 17:09 ` David Daney
  2017-02-14 18:26   ` Randy Dunlap
  2017-02-15  5:35 ` Herbert Xu
  1 sibling, 1 reply; 5+ messages in thread
From: David Daney @ 2017-02-14 17:09 UTC (permalink / raw)
  To: Arnd Bergmann, George Cherian, Herbert Xu, David S. Miller
  Cc: David Daney, linux-crypto, linux-kernel

On 02/14/2017 09:07 AM, Arnd Bergmann wrote:
> The driver fails to build if MSI support is disabled:
>
> In file included from /git/arm-soc/drivers/crypto/cavium/cpt/cptpf_main.c:18:0:
> drivers/crypto/cavium/cpt/cptpf.h:57:20: error: array type has incomplete element type 'struct msix_entry'
>   struct msix_entry msix_entries[CPT_PF_MSIX_VECTORS];
>                     ^~~~~~~~~~~~
> drivers/crypto/cavium/cpt/cptpf_main.c: In function 'cpt_enable_msix':
> drivers/crypto/cavium/cpt/cptpf_main.c:344:8: error: implicit declaration of function 'pci_enable_msix';did you mean 'cpt_enable_msix'? [-Werror=implicit-function-declaration]
>
> On the other hand, it doesn't seem to have any build dependency on ARCH_THUNDER,
> so let's allow compile-testing to catch this kind of problem more easily.
> The 64-bit dependency is needed for the use of readq/writeq.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/crypto/cavium/cpt/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/cavium/cpt/Kconfig b/drivers/crypto/cavium/cpt/Kconfig
> index 247f1cbbefc1..cbd51b1aa046 100644
> --- a/drivers/crypto/cavium/cpt/Kconfig
> +++ b/drivers/crypto/cavium/cpt/Kconfig
> @@ -7,7 +7,8 @@ config CRYPTO_DEV_CPT
>
>  config CAVIUM_CPT
>  	tristate "Cavium Cryptographic Accelerator driver"
> -	depends on ARCH_THUNDER
> +	depends on ARCH_THUNDER || COMPILE_TEST
> +	depends on PCI_MSI && 64BIT


Perhaps we should select PCI and PCI_MSI instead.

These systems cannot function without those.

>  	select CRYPTO_DEV_CPT
>  	help
>  	  Support for Cavium CPT block found in octeon-tx series of
>

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

* Re: [PATCH] crypto: cavium: fix Kconfig dependencies
  2017-02-14 17:09 ` David Daney
@ 2017-02-14 18:26   ` Randy Dunlap
  2017-02-14 18:30     ` David Daney
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2017-02-14 18:26 UTC (permalink / raw)
  To: David Daney, Arnd Bergmann, George Cherian, Herbert Xu, David S. Miller
  Cc: David Daney, linux-crypto, linux-kernel

On 02/14/17 09:09, David Daney wrote:
> On 02/14/2017 09:07 AM, Arnd Bergmann wrote:
>> The driver fails to build if MSI support is disabled:
>>
>> In file included from /git/arm-soc/drivers/crypto/cavium/cpt/cptpf_main.c:18:0:
>> drivers/crypto/cavium/cpt/cptpf.h:57:20: error: array type has incomplete element type 'struct msix_entry'
>>   struct msix_entry msix_entries[CPT_PF_MSIX_VECTORS];
>>                     ^~~~~~~~~~~~
>> drivers/crypto/cavium/cpt/cptpf_main.c: In function 'cpt_enable_msix':
>> drivers/crypto/cavium/cpt/cptpf_main.c:344:8: error: implicit declaration of function 'pci_enable_msix';did you mean 'cpt_enable_msix'? [-Werror=implicit-function-declaration]
>>
>> On the other hand, it doesn't seem to have any build dependency on ARCH_THUNDER,
>> so let's allow compile-testing to catch this kind of problem more easily.
>> The 64-bit dependency is needed for the use of readq/writeq.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>>  drivers/crypto/cavium/cpt/Kconfig | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/crypto/cavium/cpt/Kconfig b/drivers/crypto/cavium/cpt/Kconfig
>> index 247f1cbbefc1..cbd51b1aa046 100644
>> --- a/drivers/crypto/cavium/cpt/Kconfig
>> +++ b/drivers/crypto/cavium/cpt/Kconfig
>> @@ -7,7 +7,8 @@ config CRYPTO_DEV_CPT
>>
>>  config CAVIUM_CPT
>>      tristate "Cavium Cryptographic Accelerator driver"
>> -    depends on ARCH_THUNDER
>> +    depends on ARCH_THUNDER || COMPILE_TEST
>> +    depends on PCI_MSI && 64BIT
> 
> 
> Perhaps we should select PCI and PCI_MSI instead.
> 
> These systems cannot function without those.

Then the "depends" (and hence the patch) is correct.

A driver should not enable all of PCI if it is disabled
for some other reason.

>>      select CRYPTO_DEV_CPT
>>      help
>>        Support for Cavium CPT block found in octeon-tx series of
>>
> 


-- 
~Randy

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

* Re: [PATCH] crypto: cavium: fix Kconfig dependencies
  2017-02-14 18:26   ` Randy Dunlap
@ 2017-02-14 18:30     ` David Daney
  0 siblings, 0 replies; 5+ messages in thread
From: David Daney @ 2017-02-14 18:30 UTC (permalink / raw)
  To: Randy Dunlap, Arnd Bergmann, George Cherian, Herbert Xu, David S. Miller
  Cc: David Daney, linux-crypto, linux-kernel

On 02/14/2017 10:26 AM, Randy Dunlap wrote:
> On 02/14/17 09:09, David Daney wrote:
>> On 02/14/2017 09:07 AM, Arnd Bergmann wrote:
>>> The driver fails to build if MSI support is disabled:
>>>
>>> In file included from /git/arm-soc/drivers/crypto/cavium/cpt/cptpf_main.c:18:0:
>>> drivers/crypto/cavium/cpt/cptpf.h:57:20: error: array type has incomplete element type 'struct msix_entry'
>>>   struct msix_entry msix_entries[CPT_PF_MSIX_VECTORS];
>>>                     ^~~~~~~~~~~~
>>> drivers/crypto/cavium/cpt/cptpf_main.c: In function 'cpt_enable_msix':
>>> drivers/crypto/cavium/cpt/cptpf_main.c:344:8: error: implicit declaration of function 'pci_enable_msix';did you mean 'cpt_enable_msix'? [-Werror=implicit-function-declaration]
>>>
>>> On the other hand, it doesn't seem to have any build dependency on ARCH_THUNDER,
>>> so let's allow compile-testing to catch this kind of problem more easily.
>>> The 64-bit dependency is needed for the use of readq/writeq.
>>>
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>> ---
>>>  drivers/crypto/cavium/cpt/Kconfig | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/crypto/cavium/cpt/Kconfig b/drivers/crypto/cavium/cpt/Kconfig
>>> index 247f1cbbefc1..cbd51b1aa046 100644
>>> --- a/drivers/crypto/cavium/cpt/Kconfig
>>> +++ b/drivers/crypto/cavium/cpt/Kconfig
>>> @@ -7,7 +7,8 @@ config CRYPTO_DEV_CPT
>>>
>>>  config CAVIUM_CPT
>>>      tristate "Cavium Cryptographic Accelerator driver"
>>> -    depends on ARCH_THUNDER
>>> +    depends on ARCH_THUNDER || COMPILE_TEST
>>> +    depends on PCI_MSI && 64BIT
>>
>>
>> Perhaps we should select PCI and PCI_MSI instead.
>>
>> These systems cannot function without those.
>
> Then the "depends" (and hence the patch) is correct.
>
> A driver should not enable all of PCI if it is disabled
> for some other reason.

I see your point.  In that case, this patch:

Acked-by: David Daney <david.daney@cavium.com>


>
>>>      select CRYPTO_DEV_CPT
>>>      help
>>>        Support for Cavium CPT block found in octeon-tx series of
>>>
>>
>
>

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

* Re: [PATCH] crypto: cavium: fix Kconfig dependencies
  2017-02-14 17:07 [PATCH] crypto: cavium: fix Kconfig dependencies Arnd Bergmann
  2017-02-14 17:09 ` David Daney
@ 2017-02-15  5:35 ` Herbert Xu
  1 sibling, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2017-02-15  5:35 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: George Cherian, David S. Miller, David Daney, linux-crypto, linux-kernel

On Tue, Feb 14, 2017 at 06:07:31PM +0100, Arnd Bergmann wrote:
> The driver fails to build if MSI support is disabled:
> 
> In file included from /git/arm-soc/drivers/crypto/cavium/cpt/cptpf_main.c:18:0:
> drivers/crypto/cavium/cpt/cptpf.h:57:20: error: array type has incomplete element type 'struct msix_entry'
>   struct msix_entry msix_entries[CPT_PF_MSIX_VECTORS];
>                     ^~~~~~~~~~~~
> drivers/crypto/cavium/cpt/cptpf_main.c: In function 'cpt_enable_msix':
> drivers/crypto/cavium/cpt/cptpf_main.c:344:8: error: implicit declaration of function 'pci_enable_msix';did you mean 'cpt_enable_msix'? [-Werror=implicit-function-declaration]
> 
> On the other hand, it doesn't seem to have any build dependency on ARCH_THUNDER,
> so let's allow compile-testing to catch this kind of problem more easily.
> The 64-bit dependency is needed for the use of readq/writeq.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Patch applied.  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] 5+ messages in thread

end of thread, other threads:[~2017-02-15  5:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-14 17:07 [PATCH] crypto: cavium: fix Kconfig dependencies Arnd Bergmann
2017-02-14 17:09 ` David Daney
2017-02-14 18:26   ` Randy Dunlap
2017-02-14 18:30     ` David Daney
2017-02-15  5:35 ` 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).