]> git.itanic.dy.fi Git - linux-stable/commitdiff
riscv: only select DMA_DIRECT_REMAP from RISCV_ISA_ZICBOM and ERRATA_THEAD_PBMT
authorChristoph Hellwig <hch@lst.de>
Wed, 18 Oct 2023 05:26:53 +0000 (07:26 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 26 Oct 2023 07:42:38 +0000 (09:42 +0200)
RISCV_DMA_NONCOHERENT is also used for whacky non-standard
non-coherent ops that use different hooks in dma-direct.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tested-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20231018052654.50074-3-hch@lst.de
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
arch/riscv/Kconfig
arch/riscv/Kconfig.errata

index 0ac0b538379718f1464fb28fc59debcaf964595a..9c48fecc671918ed7c77eda92f333e03dbf9f4e3 100644 (file)
@@ -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
index 566bcefeab502c45f69b332c43857ea657abef57..e2c731cfed8cc6e878a6fed176cc82ae79b2fbfb 100644 (file)
@@ -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