lkml.org 
[lkml]   [2019]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: DMA-API attr - DMA_ATTR_NO_KERNEL_MAPPING
From
Date
On 01/07/2019 18:47, Pankaj Suryawanshi wrote:
>> If you want a kernel mapping, *don't* explicitly request not to have a
>> kernel mapping in the first place. It's that simple.
>>
>
> Do you mean do not use dma-api ? because if i used dma-api it will give you
> mapped virtual address.
> or i have to use directly cma_alloc() in my driver. // if i used this
> approach i need to reserved more vmalloc area.

No, I mean just call dma_alloc_attrs() normally *without* adding the
DMA_ATTR_NO_KERNEL_MAPPING flag. That flag means "I never ever want to
make CPU accesses to this buffer from the kernel" - that is clearly not
the case for your code, so it is utterly nonsensical to still pass the
flag but try to hack around it later.

Robin.

\
 
 \ /
  Last update: 2019-07-01 19:55    [W:0.054 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site