public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: Kconfig: Select DMA_DIRECT_REMAP only if MMU is enabled
@ 2023-09-01 10:51 Prabhakar
  2023-09-06  2:50 ` patchwork-bot+linux-riscv
  0 siblings, 1 reply; 2+ messages in thread
From: Prabhakar @ 2023-09-01 10:51 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Conor Dooley,
	Geert Uytterhoeven, linux-riscv
  Cc: linux-kernel, Prabhakar, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

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>
---
 arch/riscv/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 468063780a93..a065abdc80e3 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -273,7 +273,7 @@ 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
+	select DMA_DIRECT_REMAP if MMU
 
 config RISCV_NONSTANDARD_CACHE_OPS
 	bool
-- 
2.34.1


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

* Re: [PATCH] riscv: Kconfig: Select DMA_DIRECT_REMAP only if MMU is enabled
  2023-09-01 10:51 [PATCH] riscv: Kconfig: Select DMA_DIRECT_REMAP only if MMU is enabled Prabhakar
@ 2023-09-06  2:50 ` patchwork-bot+linux-riscv
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+linux-riscv @ 2023-09-06  2:50 UTC (permalink / raw)
  To: Prabhakar
  Cc: linux-riscv, paul.walmsley, palmer, aou, conor.dooley,
	geert+renesas, linux-kernel, prabhakar.mahadev-lad.rj

Hello:

This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Fri,  1 Sep 2023 11:51:11 +0100 you wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> 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.
> 
> [...]

Here is the summary with links:
  - riscv: Kconfig: Select DMA_DIRECT_REMAP only if MMU is enabled
    https://git.kernel.org/riscv/c/5bf68a586ff4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-09-06  2:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-01 10:51 [PATCH] riscv: Kconfig: Select DMA_DIRECT_REMAP only if MMU is enabled Prabhakar
2023-09-06  2:50 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox