All of lore.kernel.org
 help / color / mirror / Atom feed
* crypto: xilinx - Turn SHA into a tristate and allow COMPILE_TEST
@ 2022-03-09  3:20 Herbert Xu
  2022-03-22 13:13 ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2022-03-09  3:20 UTC (permalink / raw)
  To: Harsha, Linux Crypto Mailing List

This patch turns the new SHA driver into a tristate and also allows
compile testing.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 5d7508230b7d..97455a5f05c1 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -809,8 +809,8 @@ config CRYPTO_DEV_ZYNQMP_AES
 	  for AES algorithms.
 
 config CRYPTO_DEV_ZYNQMP_SHA3
-	bool "Support for Xilinx ZynqMP SHA3 hardware accelerator"
-	depends on ZYNQMP_FIRMWARE
+	tristate "Support for Xilinx ZynqMP SHA3 hardware accelerator"
+	depends on ZYNQMP_FIRMWARE || COMPILE_TEST
 	select CRYPTO_SHA3
 	help
 	  Xilinx ZynqMP has SHA3 engine used for secure hash calculation.
-- 
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] 5+ messages in thread

* Re: crypto: xilinx - Turn SHA into a tristate and allow COMPILE_TEST
  2022-03-09  3:20 crypto: xilinx - Turn SHA into a tristate and allow COMPILE_TEST Herbert Xu
@ 2022-03-22 13:13 ` Guenter Roeck
  2022-03-23  3:35   ` [PATCH] cacheflush.h: Add forward declaration for struct folio Herbert Xu
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2022-03-22 13:13 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Harsha, Linux Crypto Mailing List

On Wed, Mar 09, 2022 at 03:20:01PM +1200, Herbert Xu wrote:
> This patch turns the new SHA driver into a tristate and also allows
> compile testing.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

This results in:

Building s390:allmodconfig ... failed
--------------
Error log:
In file included from drivers/crypto/xilinx/zynqmp-sha.c:6:
include/linux/cacheflush.h:12:46: error: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
   12 | static inline void flush_dcache_folio(struct folio *folio)

Guenter

> 
> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> index 5d7508230b7d..97455a5f05c1 100644
> --- a/drivers/crypto/Kconfig
> +++ b/drivers/crypto/Kconfig
> @@ -809,8 +809,8 @@ config CRYPTO_DEV_ZYNQMP_AES
>  	  for AES algorithms.
>  
>  config CRYPTO_DEV_ZYNQMP_SHA3
> -	bool "Support for Xilinx ZynqMP SHA3 hardware accelerator"
> -	depends on ZYNQMP_FIRMWARE
> +	tristate "Support for Xilinx ZynqMP SHA3 hardware accelerator"
> +	depends on ZYNQMP_FIRMWARE || COMPILE_TEST
>  	select CRYPTO_SHA3
>  	help
>  	  Xilinx ZynqMP has SHA3 engine used for secure hash calculation.

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

* [PATCH] cacheflush.h: Add forward declaration for struct folio
  2022-03-22 13:13 ` Guenter Roeck
@ 2022-03-23  3:35   ` Herbert Xu
  2022-03-23 12:43     ` Matthew Wilcox
  2022-03-23 17:11     ` Linus Torvalds
  0 siblings, 2 replies; 5+ messages in thread
From: Herbert Xu @ 2022-03-23  3:35 UTC (permalink / raw)
  To: Guenter Roeck, Linus Torvalds, Linux Kernel Mailing List
  Cc: Harsha, Linux Crypto Mailing List, Matthew Wilcox, Andrew Morton

On Tue, Mar 22, 2022 at 06:13:27AM -0700, Guenter Roeck wrote:
> On Wed, Mar 09, 2022 at 03:20:01PM +1200, Herbert Xu wrote:
> > This patch turns the new SHA driver into a tristate and also allows
> > compile testing.
> > 
> > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 
> This results in:
> 
> Building s390:allmodconfig ... failed
> --------------
> Error log:
> In file included from drivers/crypto/xilinx/zynqmp-sha.c:6:
> include/linux/cacheflush.h:12:46: error: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
>    12 | static inline void flush_dcache_folio(struct folio *folio)

This should be fixed in cacheflush.h:

---8<---
The struct folio is not declared in cacheflush.h so we need to
provide a forward declaration as otherwise users of this header
file may get warnings.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Fixes: 522a0032af00 ("Add linux/cacheflush.h")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/include/linux/cacheflush.h b/include/linux/cacheflush.h
index fef8b607f97e..a6189d21f2ba 100644
--- a/include/linux/cacheflush.h
+++ b/include/linux/cacheflush.h
@@ -4,6 +4,8 @@
 
 #include <asm/cacheflush.h>
 
+struct folio;
+
 #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
 #ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO
 void flush_dcache_folio(struct folio *folio);
-- 
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] 5+ messages in thread

* Re: [PATCH] cacheflush.h: Add forward declaration for struct folio
  2022-03-23  3:35   ` [PATCH] cacheflush.h: Add forward declaration for struct folio Herbert Xu
@ 2022-03-23 12:43     ` Matthew Wilcox
  2022-03-23 17:11     ` Linus Torvalds
  1 sibling, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2022-03-23 12:43 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Guenter Roeck, Linus Torvalds, Linux Kernel Mailing List, Harsha,
	Linux Crypto Mailing List, Andrew Morton

On Wed, Mar 23, 2022 at 03:35:10PM +1200, Herbert Xu wrote:
> This should be fixed in cacheflush.h:
> 
> ---8<---
> The struct folio is not declared in cacheflush.h so we need to
> provide a forward declaration as otherwise users of this header
> file may get warnings.
> 
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Fixes: 522a0032af00 ("Add linux/cacheflush.h")
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

> diff --git a/include/linux/cacheflush.h b/include/linux/cacheflush.h
> index fef8b607f97e..a6189d21f2ba 100644
> --- a/include/linux/cacheflush.h
> +++ b/include/linux/cacheflush.h
> @@ -4,6 +4,8 @@
>  
>  #include <asm/cacheflush.h>
>  
> +struct folio;
> +
>  #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
>  #ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO
>  void flush_dcache_folio(struct folio *folio);
> -- 
> 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

* Re: [PATCH] cacheflush.h: Add forward declaration for struct folio
  2022-03-23  3:35   ` [PATCH] cacheflush.h: Add forward declaration for struct folio Herbert Xu
  2022-03-23 12:43     ` Matthew Wilcox
@ 2022-03-23 17:11     ` Linus Torvalds
  1 sibling, 0 replies; 5+ messages in thread
From: Linus Torvalds @ 2022-03-23 17:11 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Guenter Roeck, Linux Kernel Mailing List, Harsha,
	Linux Crypto Mailing List, Matthew Wilcox, Andrew Morton

On Tue, Mar 22, 2022 at 8:35 PM Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> This should be fixed in cacheflush.h:

Applied. Thanks,

              Linus

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

end of thread, other threads:[~2022-03-23 17:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09  3:20 crypto: xilinx - Turn SHA into a tristate and allow COMPILE_TEST Herbert Xu
2022-03-22 13:13 ` Guenter Roeck
2022-03-23  3:35   ` [PATCH] cacheflush.h: Add forward declaration for struct folio Herbert Xu
2022-03-23 12:43     ` Matthew Wilcox
2022-03-23 17:11     ` Linus Torvalds

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.