[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231222150417.GA23363@lst.de>
Date: Fri, 22 Dec 2023 16:04:17 +0100
From: Christoph Hellwig <hch@....de>
To: Conor Dooley <conor@...nel.org>
Cc: Maxim Kochetkov <fido_max@...ox.ru>, Christoph Hellwig <hch@....de>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
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 02:54:19PM +0000, Conor Dooley wrote:
> > of_dma_is_coherent() affects only DT devices. And we can override it with
> > "dma-coherent"/"dma-noncoherent". ACPI devices can specify by
> > "attr == DEV_DMA_COHERENT". But all other devices (platform_device, usb,
>
> I would have expected that usb devices "inherit" the value from the usb
> controller whose bus they are on. Similarly, platform devices are on a
> bus that should be marked as non-coherent if that is the case.
> Christoph certainly knows better how things operate here however.
usb is not a DMAable devices, you need to use the USB layer helpers
that call the DMA API on the host controller's device. platform_device
must have a device tree and the dma-noncoherent attribute somewhere in
the hierarchy.
Powered by blists - more mailing lists