lkml.org 
[lkml]   [2023]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC PATCH] dma: coherent: respect to device 'dma-coherent' property
Date
Hi Christoph,

> -----Original Message-----
> From: Christoph Hellwig <hch@lst.de>
> Sent: Sunday, April 16, 2023 2:30 PM
> To: Z.Q. Hou <zhiqiang.hou@nxp.com>
> Cc: iommu@lists.linux.dev; linux-kernel@vger.kernel.org; hch@lst.de;
> m.szyprowski@samsung.com; robin.murphy@arm.com
> Subject: Re: [RFC PATCH] dma: coherent: respect to device 'dma-coherent'
> property
>
> On Fri, Apr 14, 2023 at 04:03:07PM +0800, Zhiqiang Hou wrote:
> > From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >
> > Currently, the coherent DMA memory is always mapped as writecombine
> > and uncached, ignored the 'dma-coherent' property in device node, this
> > patch is to map the memory as writeback and cached when the device has
> > 'dma-coherent' property.
>
> What is the use case here? The somewhat misnamed per-device coherent
> memory is intended for small per-device pools of sram or such used for
> staging memory.

In my case, there are multiple Cortex-A cores within the cluster, in which it is
cache coherent, they are split into 2 island for running Linux and RTOS respectively.
I created a virtual device for Linux and RTOS communication using shared memory.
In Linux side, I created a per-device dma memory pool and added 'dma-coherent'
for the virtual device, but the data in shared memory can't be sync up, finally found
the per-device dma pool is always mapped as uncached, so submitted this fix patch.

Thanks,
Zhiqiang

\
 
 \ /
  Last update: 2023-04-17 04:07    [W:0.062 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site