[PATCH 1/1] riscv: set ARCH_DMA_DEFAULT_COHERENT if RISCV_DMA_NONCOHERENT is not set
Maxim Kochetkov
fido_max at inbox.ru
Sun Dec 24 22:47:21 PST 2023
On 23.12.2023 07:59, Christoph Hellwig wrote:
> On Fri, Dec 22, 2023 at 04:01:43PM +0000, Jiaxun Yang wrote:
>>>
>>> But arch_setup_dma_ops() is called only from of_dma_configure_id() and
>>> acpi_dma_configure_id(). So it works only for DT and ACPI devices. What
>>> about platform_device?
>>
>> Ah I see, that's the problem, in MIPS's use case all DMA capable devices
>> are following platform's default coherency. For RISC-V we assume all device
>> are enabled by ACPI or DT.
>>
>> Perhaps you can override it in driver, but that will make drivers platform
>> dependent.
>>
>> I'll leave this question to Christoph.
>
> I've already said it. You must not have DMA capable devices that aren't
> declared in ACPI or OF, just like on any modern Linux platform.
Ok. I've got the point. Thank you for clarification.
>
> What devices are you concerned about anyway Maxim?
I have 3rd party external out of tree camera driver. csi, isp, dewarp
components are OF, but common media device is created as
platform_device. I will convert is to OF.
More information about the linux-riscv
mailing list