lkml.org 
[lkml]   [2019]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7] dma-direct: handle DMA_ATTR_NON_CONSISTENT in common code
On Sun, Jun 16, 2019 at 06:08:40PM +0800, Hillf Danton wrote:
> Literally, any cpu (call it cpuW) other than pcx12 and pcx1 will no longer do
> dma alloc for any device with this patch applied.

Yes. And that is not a chance from the previous code, where only
pcx1 and pcx12 could do coherent allocations,

> On the other hand,
> !dev_is_dma_coherent(dev) && !(attrs & DMA_ATTR_NON_CONSISTENT) will ask
> any cpu to do dma alloc, regardless of pcx1. This patch works imo unless cpuW
> plays games only with devices that are dma coherent. I doubt it is true.

I can't parse these two sentences. But to explains the bits mentioned
here - dev_is_dma_coherent will return if a device is coherently
attached vs the cpu. This will never be true for the parisc direct
mapping. DMA_ATTR_NON_CONSISTENT asks for a non-coherent mapping that
needs to be explicitly synced. This support now is in the dma-direct
core code, and this is what the parisc specific devices used on the
non-pcxl systems use, as they do not support dma coherency at all.
(the story slightly changes when using an iommu, but that is irrelevant
here)

\
 
 \ /
  Last update: 2019-06-25 08:12    [W:0.105 / U:1.808 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site