linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the crypto tree
@ 2023-05-22  0:52 Stephen Rothwell
  2023-05-22  5:15 ` Herbert Xu
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2023-05-22  0:52 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Huan Feng, Jia Jie Ho, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2269 bytes --]

Hi all,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/tty/serial/amba-pl011.c: In function 'pl011_sgbuf_init':
drivers/tty/serial/amba-pl011.c:379:30: error: implicit declaration of function 'phys_to_page'; did you mean 'pfn_to_page'? [-Werror=implicit-function-declaration]
  379 |         sg_set_page(&sg->sg, phys_to_page(dma_addr),
      |                              ^~~~~~~~~~~~
      |                              pfn_to_page
drivers/tty/serial/amba-pl011.c:379:30: error: passing argument 2 of 'sg_set_page' makes pointer from integer without a cast [-Werror=int-conversion]
  379 |         sg_set_page(&sg->sg, phys_to_page(dma_addr),
      |                              ^~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              int
In file included from include/linux/kfifo.h:42,
                 from include/linux/tty_port.h:5,
                 from include/linux/tty.h:12,
                 from drivers/tty/serial/amba-pl011.c:25:
include/linux/scatterlist.h:136:69: note: expected 'struct page *' but argument is of type 'int'
  136 | static inline void sg_set_page(struct scatterlist *sg, struct page *page,
      |                                                        ~~~~~~~~~~~~~^~~~

Caused by commit

  42ef0e944b01 ("crypto: starfive - Add crypto engine support")

I applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 22 May 2023 10:47:38 +1000
Subject: [PATCH] fixup for "crypto: starfive - Add crypto engine support"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/crypto/starfive/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig
index be58d1473523..8795b2fddb4e 100644
--- a/drivers/crypto/starfive/Kconfig
+++ b/drivers/crypto/starfive/Kconfig
@@ -4,7 +4,7 @@
 
 config CRYPTO_DEV_JH7110
 	tristate "StarFive JH7110 cryptographic engine driver"
-	depends on SOC_STARFIVE || COMPILE_TEST
+	depends on SOC_STARFIVE
 	select CRYPTO_ENGINE
 	select CRYPTO_HMAC
 	select CRYPTO_SHA256
-- 
2.39.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the crypto tree
  2023-05-22  0:52 linux-next: build failure after merge of the crypto tree Stephen Rothwell
@ 2023-05-22  5:15 ` Herbert Xu
  2023-05-23  0:36   ` Stephen Rothwell
  0 siblings, 1 reply; 10+ messages in thread
From: Herbert Xu @ 2023-05-22  5:15 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Crypto List, Huan Feng, Jia Jie Ho,
	Linux Kernel Mailing List, Linux Next Mailing List

On Mon, May 22, 2023 at 10:52:57AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the crypto tree, today's linux-next build (x86_64
> allmodconfig) failed like this:

Sorry, a fix is pending and will be pushed out soon.

Cheers,
-- 
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] 10+ messages in thread

* Re: linux-next: build failure after merge of the crypto tree
  2023-05-22  5:15 ` Herbert Xu
@ 2023-05-23  0:36   ` Stephen Rothwell
  2023-05-23  2:33     ` [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it Herbert Xu
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2023-05-23  0:36 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Linux Crypto List, Huan Feng, Jia Jie Ho,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

Hi Herbert,

On Mon, 22 May 2023 13:15:20 +0800 Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Mon, May 22, 2023 at 10:52:57AM +1000, Stephen Rothwell wrote:
> > 
> > After merging the crypto tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:  
> 
> Sorry, a fix is pending and will be pushed out soon.

That did not fix it :-(

My fix up patch is now:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 23 May 2023 10:31:28 +1000
Subject: [PATCH] fixup for "crypto: starfive - Add crypto engine support"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/crypto/starfive/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig
index 908c162ba79a..2a15d51534b9 100644
--- a/drivers/crypto/starfive/Kconfig
+++ b/drivers/crypto/starfive/Kconfig
@@ -4,7 +4,7 @@
 
 config CRYPTO_DEV_JH7110
 	tristate "StarFive JH7110 cryptographic engine driver"
-	depends on (SOC_STARFIVE || COMPILE_TEST) && DMADEVICES
+	depends on SOC_STARFIVE && DMADEVICES
 	select CRYPTO_ENGINE
 	select CRYPTO_HMAC
 	select CRYPTO_SHA256
-- 
2.39.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
  2023-05-23  0:36   ` Stephen Rothwell
@ 2023-05-23  2:33     ` Herbert Xu
  2023-05-23  6:56       ` Conor Dooley
                         ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Herbert Xu @ 2023-05-23  2:33 UTC (permalink / raw)
  To: Stephen Rothwell, Conor Dooley
  Cc: Linux Crypto List, Huan Feng, Jia Jie Ho,
	Linux Kernel Mailing List, Linux Next Mailing List

On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote:
> 
> That did not fix it :-(

OK, this patch should fix it:

---8<---
A platform option like AMBA should never be selected by a driver.
Use a dependency instead.

Also remove the depenency on DMADEVICES because the driver builds
just fine without it.  Instead add a dependency on HAS_DMA for dma
mapping support.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Conor Dooley <conor.dooley@microchip.com> 
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig
index 908c162ba79a..59002abcc0ad 100644
--- a/drivers/crypto/starfive/Kconfig
+++ b/drivers/crypto/starfive/Kconfig
@@ -4,14 +4,13 @@
 
 config CRYPTO_DEV_JH7110
 	tristate "StarFive JH7110 cryptographic engine driver"
-	depends on (SOC_STARFIVE || COMPILE_TEST) && DMADEVICES
+	depends on SOC_STARFIVE || AMBA_PL08X || COMPILE_TEST
+	depends on HAS_DMA
 	select CRYPTO_ENGINE
 	select CRYPTO_HMAC
 	select CRYPTO_SHA256
 	select CRYPTO_SHA512
 	select CRYPTO_SM3_GENERIC
-	select ARM_AMBA
-	select AMBA_PL08X
 	help
 	  Support for StarFive JH7110 crypto hardware acceleration engine.
 	  This module provides acceleration for public key algo,
-- 
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] 10+ messages in thread

* Re: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
  2023-05-23  2:33     ` [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it Herbert Xu
@ 2023-05-23  6:56       ` Conor Dooley
  2023-05-23  7:31         ` Jia Jie Ho
  2023-05-25  1:25       ` Stephen Rothwell
  2023-06-06  9:12       ` Geert Uytterhoeven
  2 siblings, 1 reply; 10+ messages in thread
From: Conor Dooley @ 2023-05-23  6:56 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Stephen Rothwell, Linux Crypto List, Huan Feng, Jia Jie Ho,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]

On Tue, May 23, 2023 at 10:33:38AM +0800, Herbert Xu wrote:
> On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote:
> > 
> > That did not fix it :-(
> 
> OK, this patch should fix it:
> 
> ---8<---
> A platform option like AMBA should never be selected by a driver.
> Use a dependency instead.

Randy submitted a patch to change the driver to not conflict with
the arch symbols:
https://lore.kernel.org/all/20230523000606.9405-1-rdunlap@infradead.org/

The corresponding change here makes sense to me,
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

@StarFive folks, you will need to go and submit a patch for
arch/riscv/Kconfig.socs that selects ARM_AMBA for your platform.

> Also remove the depenency on DMADEVICES because the driver builds
> just fine without it.  Instead add a dependency on HAS_DMA for dma
> mapping support.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Reported-by: Conor Dooley <conor.dooley@microchip.com> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 
> diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig
> index 908c162ba79a..59002abcc0ad 100644
> --- a/drivers/crypto/starfive/Kconfig
> +++ b/drivers/crypto/starfive/Kconfig
> @@ -4,14 +4,13 @@
>  
>  config CRYPTO_DEV_JH7110
>  	tristate "StarFive JH7110 cryptographic engine driver"
> -	depends on (SOC_STARFIVE || COMPILE_TEST) && DMADEVICES
> +	depends on SOC_STARFIVE || AMBA_PL08X || COMPILE_TEST

While we are changing everything, would you mind doing s/SOC/ARCH/ here?
I didn't notice that while the series was being reviewed. Otherwise,
I'll send you a patch for it.

Cheers,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
  2023-05-23  6:56       ` Conor Dooley
@ 2023-05-23  7:31         ` Jia Jie Ho
  0 siblings, 0 replies; 10+ messages in thread
From: Jia Jie Ho @ 2023-05-23  7:31 UTC (permalink / raw)
  To: Conor Dooley, Herbert Xu
  Cc: Stephen Rothwell, Linux Crypto List, Linux Kernel Mailing List,
	Linux Next Mailing List

On 23/5/2023 2:56 pm, Conor Dooley wrote:
> On Tue, May 23, 2023 at 10:33:38AM +0800, Herbert Xu wrote:
>> On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote:
>> > 
>> > That did not fix it :-(
>> 
>> OK, this patch should fix it:
>> 
>> ---8<---
>> A platform option like AMBA should never be selected by a driver.
>> Use a dependency instead.
> 
> Randy submitted a patch to change the driver to not conflict with
> the arch symbols:
> https://lore.kernel.org/all/20230523000606.9405-1-rdunlap@infradead.org/
> 
> The corresponding change here makes sense to me,
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> 
> @StarFive folks, you will need to go and submit a patch for
> arch/riscv/Kconfig.socs that selects ARM_AMBA for your platform.
> 

Sure, I'll submit a patch for this.

Thanks
Jia Jie


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

* Re: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
  2023-05-23  2:33     ` [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it Herbert Xu
  2023-05-23  6:56       ` Conor Dooley
@ 2023-05-25  1:25       ` Stephen Rothwell
  2023-06-06  9:12       ` Geert Uytterhoeven
  2 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2023-05-25  1:25 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Conor Dooley, Linux Crypto List, Huan Feng, Jia Jie Ho,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

Hi Herbert,

On Tue, 23 May 2023 10:33:38 +0800 Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote:
> > 
> > That did not fix it :-(  
> 
> OK, this patch should fix it:

That seems to have fixed it, thanks.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
  2023-05-23  2:33     ` [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it Herbert Xu
  2023-05-23  6:56       ` Conor Dooley
  2023-05-25  1:25       ` Stephen Rothwell
@ 2023-06-06  9:12       ` Geert Uytterhoeven
  2023-06-06  9:31         ` Herbert Xu
  2 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2023-06-06  9:12 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Stephen Rothwell, Conor Dooley, Linux Crypto List, Huan Feng,
	Jia Jie Ho, Linux Kernel Mailing List, Linux Next Mailing List

Hi Herbert,

On Tue, May 23, 2023 at 4:40 AM Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote:
> > That did not fix it :-(
>
> OK, this patch should fix it:
>
> ---8<---
> A platform option like AMBA should never be selected by a driver.
> Use a dependency instead.

FTR:

arch/arm/mach-s3c/Kconfig.s3c64xx=config S3C64XX_PL080
arch/arm/mach-s3c/Kconfig.s3c64xx-      def_bool DMADEVICES
arch/arm/mach-s3c/Kconfig.s3c64xx:      select AMBA_PL08X

>
> Also remove the depenency on DMADEVICES because the driver builds
> just fine without it.  Instead add a dependency on HAS_DMA for dma
> mapping support.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Reported-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig
> index 908c162ba79a..59002abcc0ad 100644
> --- a/drivers/crypto/starfive/Kconfig
> +++ b/drivers/crypto/starfive/Kconfig
> @@ -4,14 +4,13 @@
>
>  config CRYPTO_DEV_JH7110
>         tristate "StarFive JH7110 cryptographic engine driver"
> -       depends on (SOC_STARFIVE || COMPILE_TEST) && DMADEVICES
> +       depends on SOC_STARFIVE || AMBA_PL08X || COMPILE_TEST
> +       depends on HAS_DMA
>         select CRYPTO_ENGINE
>         select CRYPTO_HMAC
>         select CRYPTO_SHA256
>         select CRYPTO_SHA512
>         select CRYPTO_SM3_GENERIC
> -       select ARM_AMBA
> -       select AMBA_PL08X
>         help
>           Support for StarFive JH7110 crypto hardware acceleration engine.
>           This module provides acceleration for public key algo,

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] 10+ messages in thread

* Re: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
  2023-06-06  9:12       ` Geert Uytterhoeven
@ 2023-06-06  9:31         ` Herbert Xu
  2023-06-06  9:34           ` Geert Uytterhoeven
  0 siblings, 1 reply; 10+ messages in thread
From: Herbert Xu @ 2023-06-06  9:31 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Stephen Rothwell, Conor Dooley, Linux Crypto List, Huan Feng,
	Jia Jie Ho, Linux Kernel Mailing List, Linux Next Mailing List

On Tue, Jun 06, 2023 at 11:12:05AM +0200, Geert Uytterhoeven wrote:
>
> > ---8<---
> > A platform option like AMBA should never be selected by a driver.
> > Use a dependency instead.
> 
> FTR:
> 
> arch/arm/mach-s3c/Kconfig.s3c64xx=config S3C64XX_PL080
> arch/arm/mach-s3c/Kconfig.s3c64xx-      def_bool DMADEVICES
> arch/arm/mach-s3c/Kconfig.s3c64xx:      select AMBA_PL08X

Well that isn't a driver I think so it might be OK?

Cheers,
-- 
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] 10+ messages in thread

* Re: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
  2023-06-06  9:31         ` Herbert Xu
@ 2023-06-06  9:34           ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2023-06-06  9:34 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Stephen Rothwell, Conor Dooley, Linux Crypto List, Huan Feng,
	Jia Jie Ho, Linux Kernel Mailing List, Linux Next Mailing List

Hi Herbert,

On Tue, Jun 6, 2023 at 11:31 AM Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Tue, Jun 06, 2023 at 11:12:05AM +0200, Geert Uytterhoeven wrote:
> >
> > > ---8<---
> > > A platform option like AMBA should never be selected by a driver.
> > > Use a dependency instead.
> >
> > FTR:
> >
> > arch/arm/mach-s3c/Kconfig.s3c64xx=config S3C64XX_PL080
> > arch/arm/mach-s3c/Kconfig.s3c64xx-      def_bool DMADEVICES
> > arch/arm/mach-s3c/Kconfig.s3c64xx:      select AMBA_PL08X
>
> Well that isn't a driver I think so it might be OK?

Thanks, please ignore ;-)

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] 10+ messages in thread

end of thread, other threads:[~2023-06-06  9:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22  0:52 linux-next: build failure after merge of the crypto tree Stephen Rothwell
2023-05-22  5:15 ` Herbert Xu
2023-05-23  0:36   ` Stephen Rothwell
2023-05-23  2:33     ` [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it Herbert Xu
2023-05-23  6:56       ` Conor Dooley
2023-05-23  7:31         ` Jia Jie Ho
2023-05-25  1:25       ` Stephen Rothwell
2023-06-06  9:12       ` Geert Uytterhoeven
2023-06-06  9:31         ` Herbert Xu
2023-06-06  9:34           ` Geert Uytterhoeven

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).