fix a few RISC-V / renesas Kconfig dependencies v2
Hi all,
this small series sorts out a few Kconfig dependency issue for the rich set of RISC-V non-coherent DMA support.
Geert suggested for it to go into the soc tree, which is fine with me if I get a stable branch for it as it is required for further dma-mapping work.
Changes since v1:
- select DMA_DIRECT_REMAP from ERRATA_THEAD_CMO
PATCH 1/3 riscv: RISCV_NONSTANDARD_CACHE_OPS shouldn't depend on RISCV_DMA_NONCOHERENT
RISCV_NONSTANDARD_CACHE_OPS is also used for the pmem cache maintenance helpers, which are built into the kernel unconditionally.
--- arch/riscv/Kconfig | 1 - drivers/cache/Kconfig | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
arch/riscv/Kconfig +0 -1
@@ -277,7 +277,6 @@ config RISCV_DMA_NONCOHERENT config RISCV_NONSTANDARD_CACHE_OPS bool - depends on RISCV_DMA_NONCOHERENT help This enables function pointer support for non-standard noncoherent systems to handle cache management.
drivers/cache/Kconfig +1 -1
@@ -3,7 +3,7 @@ menu "Cache Drivers" config AX45MP_L2_CACHE bool "Andes Technology AX45MP L2 Cache controller" - depends on RISCV_DMA_NONCOHERENT + depends on RISCV select RISCV_NONSTANDARD_CACHE_OPS help Support for the L2 cache controller on Andes Technology AX45MP platforms.
Signature · 1 line
2.39.2
PATCH 2/3 riscv: only select DMA_DIRECT_REMAP from RISCV_ISA_ZICBOM and ERRATA_THEAD_PBMT
In reply to Christoph HellwigRISCV_DMA_NONCOHERENT is also used for whacky non-standard non-coherent ops that use different hooks in dma-direct.
--- arch/riscv/Kconfig | 2 +- arch/riscv/Kconfig.errata | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
arch/riscv/Kconfig +1 -1
@@ -273,7 +273,6 @@ config RISCV_DMA_NONCOHERENT select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select DMA_BOUNCE_UNALIGNED_KMALLOC if SWIOTLB - select DMA_DIRECT_REMAP if MMU config RISCV_NONSTANDARD_CACHE_OPS bool
@@ -549,6 +548,7 @@ config RISCV_ISA_ZICBOM depends on RISCV_ALTERNATIVE default y select RISCV_DMA_NONCOHERENT + select DMA_DIRECT_REMAP help Adds support to dynamically detect the presence of the ZICBOM extension (Cache Block Management Operations) and enable its
arch/riscv/Kconfig.errata +1 -0
@@ -77,6 +77,7 @@ config ERRATA_THEAD_PBMT config ERRATA_THEAD_CMO bool "Apply T-Head cache management errata" depends on ERRATA_THEAD && MMU + select DMA_DIRECT_REMAP select RISCV_DMA_NONCOHERENT default y help
Signature · 1 line
2.39.2
Re: [PATCH 2/3] riscv: only select DMA_DIRECT_REMAP from RISCV_ISA_ZICBOM and ERRATA_THEAD_PBMT
Quoted 11 lines · Christoph Hellwig
RISCV_DMA_NONCOHERENTis also used for whacky non-standard non-coherent ops that use different hooks in dma-direct.Signed-off-by Christoph Hellwig <[email protected]>Reviewed-by Conor Dooley <[email protected]>Reviewed-by Robin Murphy <[email protected]>Reviewed-by Lad Prabhakar <[email protected]>--- arch/riscv/Kconfig | 2 +- arch/riscv/Kconfig.errata | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
PATCH 3/3 soc: renesas: ARCH_R9A07G043 depends on !RISCV_ISA_ZICBOM
In reply to Christoph HellwigARCH_R9A07G043 has its own non-standard global pool based DMA coherent allocator, which conflicts with the remap based RISCV_ISA_ZICBOM version. Add a proper dependency.
--- drivers/soc/renesas/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/soc/renesas/Kconfig +1 -0
@@ -341,6 +341,7 @@ config ARCH_R9A07G043 bool "RISC-V Platform support for RZ/Five" depends on NONPORTABLE depends on RISCV_ALTERNATIVE + depends on !RISCV_ISA_ZICBOM depends on RISCV_SBI select ARCH_RZG2L select AX45MP_L2_CACHE
Signature · 1 line
2.39.2
Hi Christoph,
Quoted 2 lines · Christoph Hellwig
this small series sorts out a few
Kconfigdependency issue for the rich set of RISC-V non-coherent DMA support.
Thanks for your series!
Quoted 3 lines
Geert suggested for it to go into the soc tree, which is fine with me if I get a stable branch for it as it is required for further dma-mapping work.
As Arnd asked me to send a PR to him, I'm queuing these in renesas-fixes, and will send a PR momentarily.
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