Skip to content

Commit e7ddd00

Browse files
prabhakarladpalmer-dabbelt
authored andcommitted
riscv: Kconfig: Select DMA_DIRECT_REMAP only if MMU is enabled
kernel/dma/mapping.c has its use of pgprot_dmacoherent() inside an #ifdef CONFIG_MMU block. kernel/dma/pool.c has its use of pgprot_dmacoherent() inside an #ifdef CONFIG_DMA_DIRECT_REMAP block. So select DMA_DIRECT_REMAP only if MMU is enabled for RISCV_DMA_NONCOHERENT config. This avoids users to explicitly select MMU. Suggested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://lore.kernel.org/r/20230901105111.311200-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 77eea55 commit e7ddd00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ config RISCV_DMA_NONCOHERENT
273273
select ARCH_HAS_SYNC_DMA_FOR_CPU
274274
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
275275
select DMA_BOUNCE_UNALIGNED_KMALLOC if SWIOTLB
276-
select DMA_DIRECT_REMAP
276+
select DMA_DIRECT_REMAP if MMU
277277

278278
config RISCV_NONSTANDARD_CACHE_OPS
279279
bool

0 commit comments

Comments
 (0)