diff mbox series

[6/7] riscv: Select ARCH_DMA_DEFAULT_COHERENT

Message ID 20230221124613.2859-7-jiaxun.yang@flygoat.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series MIPS DMA coherence fixes | expand

Commit Message

Jiaxun Yang Feb. 21, 2023, 12:46 p.m. UTC
For RISCV we always assume devices are DMA coherent.
Select ARCH_DMA_DEFAULT_COHERENT to ensure dev->dma_conherent
is always initialized to true.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 arch/riscv/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Conor Dooley Feb. 21, 2023, 6:14 p.m. UTC | #1
On Tue, Feb 21, 2023 at 12:46:12PM +0000, Jiaxun Yang wrote:
> For RISCV we always assume devices are DMA coherent.

"Always assume", I'm not keen on that wording as it is unclear as to
whether you are suggesting that a) we always take devices to be DMA
coherent, or b) unless a device states it is non-coherent, we take it to
be DMA coherent.
I think you mean b, but being exact would be appreciated, thanks.

> Select ARCH_DMA_DEFAULT_COHERENT to ensure dev->dma_conherent
> is always initialized to true.
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>

Why was this not sent to the riscv list?
When (or if) you send v2, can you please make sure that you do cc it?

Thanks,
Conor.
Jiaxun Yang Feb. 21, 2023, 6:20 p.m. UTC | #2
> 2023年2月21日 18:14,Conor Dooley <conor@kernel.org> 写道:
> 
> On Tue, Feb 21, 2023 at 12:46:12PM +0000, Jiaxun Yang wrote:
>> For RISCV we always assume devices are DMA coherent.
> 
> "Always assume", I'm not keen on that wording as it is unclear as to
> whether you are suggesting that a) we always take devices to be DMA
> coherent, or b) unless a device states it is non-coherent, we take it to
> be DMA coherent.
> I think you mean b, but being exact would be appreciated, thanks.

Yep I meant option b, thanks for the point.

> 
>> Select ARCH_DMA_DEFAULT_COHERENT to ensure dev->dma_conherent
>> is always initialized to true.
>> 
>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> 
> Why was this not sent to the riscv list?
> When (or if) you send v2, can you please make sure that you do cc it?
Will do.

Thanks
- Jiaxun

> 
> Thanks,
> Conor.
diff mbox series

Patch

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 8b1dbd23dbd6..c1327309e0f6 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -13,6 +13,7 @@  config 32BIT
 config RISCV
 	def_bool y
 	select ARCH_CLOCKSOURCE_INIT
+	select ARCH_DMA_DEFAULT_COHERENT
 	select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
 	select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
 	select ARCH_HAS_BINFMT_FLAT