linux-next: build failure after merge of the crypto tree
Subsystems (3)
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 <[email protected]>
Date: Mon, 22 May 2023 10:47:38 +1000
Subject: [PATCH] fixup for "crypto: starfive - Add crypto engine support"
--- drivers/crypto/starfive/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/starfive/Kconfig +1 -1
@@ -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
Signature · 5 lines
2.39.2 -- Cheers, Stephen Rothwell
Herbert Xu
maintainerQuoted 4 lines · Stephen Rothwell
Hi all,
After merging the crypto tree, today's linux-next build (
x86_64allmodconfig) failed like this:
Sorry, a fix is pending and will be pushed out soon.
Cheers,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Hi Herbert,
Quoted 7 lines · On Mon, 22 May 2023 13:15:20 +0800 Herbert Xu <[email protected]>…
Quoted 3 lines · Stephen Rothwell
After merging the crypto tree, today's linux-next build (
x86_64allmodconfig) 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 <[email protected]>
Date: Tue, 23 May 2023 10:31:28 +1000
Subject: [PATCH] fixup for "crypto: starfive - Add crypto engine support"
--- drivers/crypto/starfive/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/starfive/Kconfig +1 -1
@@ -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
Signature · 5 lines
2.39.2 -- Cheers, Stephen Rothwell
Herbert Xu
maintainerPATCH 1/1 crypto: starfive - Depend on AMBA_PL08X instead of selecting it
Quoted 2 lines · Stephen Rothwell
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.
drivers/crypto/starfive/Kconfig +2 -3
@@ -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,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Re: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
Quoted 9 lines · Herbert Xu
Quoted 2 lines · Stephen Rothwell
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/[email protected]/
The corresponding change here makes sense to me,
@StarFive folks, you will need to go and submit a patch for arch/riscv/Kconfig.socs that selects ARM_AMBA for your platform.
Quoted 13 lines
Also remove the depenency on DMADEVICES because the driver builds just fine without it. Instead add a dependency on
HAS_DMAfor dma mapping support.Reported-by Stephen Rothwell <[email protected]>Reported-by Conor Dooley <[email protected]>Signed-off-by Herbert Xu <[email protected]>drivers/crypto/starfive/Kconfig +0
-0
drivers/crypto/starfive/Kconfig line 7
Quoted 5 lines
drivers/crypto/starfive/Kconfig +1
-1@@ -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.
Jia Jie Ho
maintainerRe: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
Quoted 15 lines · Conor Dooley
Quoted 9 lines · Herbert Xu
Quoted 2 lines · Stephen Rothwell
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/[email protected]/
Quoted 6 lines
The corresponding change here makes sense to me,
Reviewed-by Conor Dooley <[email protected]>@StarFive folks, you will need to go and submit a patch for
arch/riscv/Kconfig.socsthat selectsARM_AMBAfor your platform.
Sure, I'll submit a patch for this.
Thanks
Jia Jie
Re: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
In reply to Herbert XuHi Herbert,
Quoted 6 lines · On Tue, 23 May 2023 10:33:38 +0800 Herbert Xu <[email protected]>…
Quoted 2 lines · Stephen Rothwell
That did not fix it :-(
OK, this patch should fix it:
That seems to have fixed it, thanks.
Signature · 2 lines
Cheers, Stephen Rothwell
Re: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
In reply to Herbert XuHi Herbert,
Quoted 8 lines · Herbert Xu
Quoted 1 line · Stephen Rothwell
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_PL080arch/arm/mach-s3c/Kconfig.s3c64xx- def_bool DMADEVICESarch/arm/mach-s3c/Kconfig.s3c64xx: select AMBA_PL08X
Quoted 20 lines
Also remove the depenency on DMADEVICES because the driver builds just fine without it. Instead add a dependency on
HAS_DMAfor dma mapping support.Reported-by Stephen Rothwell <[email protected]>Reported-by Conor Dooley <[email protected]>Signed-off-by Herbert Xu <[email protected]>drivers/crypto/starfive/Kconfig +2
-1@@ -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
drivers/crypto/starfive/Kconfig line 16
Quoted 10 lines
drivers/crypto/starfive/Kconfig +0
-2select 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
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Herbert Xu
maintainerRe: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
Quoted 10 lines · Geert Uytterhoeven
Quoted 4 lines
---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_PL080arch/arm/mach-s3c/Kconfig.s3c64xx-def_boolDMADEVICESarch/arm/mach-s3c/Kconfig.s3c64xx: selectAMBA_PL08X
Well that isn't a driver I think so it might be OK?
Cheers,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Re: [PATCH] crypto: starfive - Depend on AMBA_PL08X instead of selecting it
Hi Herbert,
Quoted 6 lines · Herbert Xu
Quoted 5 lines · Geert Uytterhoeven
Quoted 4 lines
---8<---
A platform option like AMBA should never be selected by a driver. Use a dependency instead.
Quoted 7 lines
Quoted 5 lines
FTR:
arch/arm/mach-s3c/Kconfig.s3c64xx=config
S3C64XX_PL080arch/arm/mach-s3c/Kconfig.s3c64xx-def_boolDMADEVICESarch/arm/mach-s3c/Kconfig.s3c64xx: selectAMBA_PL08XWell that isn't a driver I think so it might be OK?
Thanks, please ignore ;-)
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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