From: Pankaj Suryawanshi <pankajssuryawanshi@gmail.com>
To: linux-mm@kvack.org, Michal Hocko <mhocko@kernel.org>,
linux-kernel@vger.kernel.org, Vlastimil Babka <vbabka@suse.cz>
Subject: Re: DMA-API attr - DMA_ATTR_NO_KERNEL_MAPPING
Date: Wed, 26 Jun 2019 22:12:45 +0530 [thread overview]
Message-ID: <CACDBo55GfomD4yAJ1qaOvdm8EQaD-28=etsRHb39goh+5VAeqw@mail.gmail.com> (raw)
In-Reply-To: <CACDBo564RoWpi8y2pOxoddnn0s3f3sA-fmNxpiXuxebV5TFBJA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]
[CC: linux kernel and Vlastimil Babka]
On Wed, Jun 26, 2019 at 10:11 PM Pankaj Suryawanshi <
pankajssuryawanshi@gmail.com> wrote:
> Hello,
>
> I am writing driver in which I used DMA_ATTR_NO_KERNEL_MAPPING attribute
> for cma allocation using dma_alloc_attr(), as per kernel docs
> https://www.kernel.org/doc/Documentation/DMA-attributes.txt buffers
> allocated with this attribute can be only passed to user space by calling
> dma_mmap_attrs().
>
> how can I mapped in kernel space (after dma_alloc_attr with
> DMA_ATTR_NO_KERNEL_MAPPING ) ?
>
> For example.
>
> 1. virtual_addr = dma_alloc_attr(device, size,, phys, GFP_KERNEL,
> DMA_ATTR_NO_KERNEL_MAPPING );
> 2. Now i can use phys for driver as physical address and i am using in
> drivers, working fine.
> 3. Now i want to use virtual address in kernel space(in some cases virtual
> address required in my driver), not allow to use virtual_addr in kernel
> space because DMA_ATTR_NO_KERNEL_MAPPING, How can i mapped again to
> kernel space ?
>
> How can i used DMA_ATTR_NO_KERNEL_MAPPING and mapped some area for
> kernel space when needed ?
>
> Is there any apis available ? or improvement is required in linux kernel
> dma-apis ?
>
> Regards,
> Pankaj
>
[-- Attachment #2: Type: text/html, Size: 2728 bytes --]
next prev parent reply other threads:[~2019-06-26 16:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 16:41 Pankaj Suryawanshi
2019-06-26 16:42 ` Pankaj Suryawanshi [this message]
2019-06-26 17:51 ` Christoph Hellwig
2019-06-28 16:29 ` Pankaj Suryawanshi
2019-07-01 14:09 ` Robin Murphy
2019-07-01 17:47 ` Pankaj Suryawanshi
2019-07-01 17:52 ` Pankaj Suryawanshi
2019-07-01 17:54 ` Robin Murphy
2019-07-01 18:07 ` Pankaj Suryawanshi
2019-07-01 18:36 ` Pankaj Suryawanshi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACDBo55GfomD4yAJ1qaOvdm8EQaD-28=etsRHb39goh+5VAeqw@mail.gmail.com' \
--to=pankajssuryawanshi@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox