[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231223045912.GA21836@lst.de>
Date: Sat, 23 Dec 2023 05:59:12 +0100
From: Christoph Hellwig <hch@....de>
To: Jiaxun Yang <jiaxun.yang@...goat.com>
Cc: Maxim Kochetkov <fido_max@...ox.ru>, Conor Dooley <conor@...nel.org>,
Christoph Hellwig <hch@....de>, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org, robh@...nel.org, mpe@...erman.id.au,
aou@...s.berkeley.edu, palmer@...belt.com, paul.walmsley@...ive.com
Subject: Re: [PATCH 1/1] riscv: set ARCH_DMA_DEFAULT_COHERENT if
RISCV_DMA_NONCOHERENT is not set
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.
What devices are you concerned about anyway Maxim?
Powered by blists - more mailing lists