kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Driver to allow DMA from user space
Date: Tue, 20 Dec 2016 10:38:28 +0100	[thread overview]
Message-ID: <20161220093828.GA13045@kroah.com> (raw)
In-Reply-To: <CAJ2oMhLdc0FqxL2KUQYKNey7podoztoZnuWuWMmtTJukfFvp=Q@mail.gmail.com>

On Mon, Dec 19, 2016 at 06:08:47PM +0200, Ran Shalit wrote:
> Hello,
> 
> I want to use DMA from userspace.

Why?

> I already use dma in kernel, and now I want can create a character
> device which will be responsible for this.

Why?

> The only problem is that I want to use the same memory which was
> allocated in kernel with dma_alloc_coherent.

Why?

> Is it correct to use mmap in order to use the phsyical memory which
> was allocated with dma_alloc_coherent ?
> 
> If it's that simple it can be surely helpful, and the simple driver
> which wraps dma_alloc_coherent can do the job for dmaing from
> userspace.

Have you looked at the uio driver interface?

But again, why?  What problem are you trying to solve here?

thanks,

greg k-h

  reply	other threads:[~2016-12-20  9:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 16:08 Driver to allow DMA from user space Ran Shalit
2016-12-20  9:38 ` Greg KH [this message]
2016-12-20 10:15   ` Ran Shalit
2016-12-20 10:26     ` Greg KH
2016-12-24 15:47       ` Ran Shalit
2016-12-25 12:37         ` Greg KH
2016-12-30 18:11           ` Ran Shalit
2016-12-31 10:55             ` Greg KH

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=20161220093828.GA13045@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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;
as well as URLs for NNTP newsgroup(s).