From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: uio_dmem_genirq.c and DMA mapping to user space ?
Date: Tue, 12 Sep 2017 05:37:16 -0700 [thread overview]
Message-ID: <20170912123716.GA19626@kroah.com> (raw)
In-Reply-To: <1505218705.31322.108.camel@infinera.com>
On Tue, Sep 12, 2017 at 12:18:27PM +0000, Joakim Tjernlund wrote:
> Hi
>
> I am trying to use the uio_dmem_genirq.c driver for allocating DMA memory to a PCI device
> using the uio_pci_generic.c driver.
>
> I got as far as defining an UIO dev containing only Dynamic DMA memory and
> now I am stuck.
> I can see how DMA memory is allocated when opening the /dev/uio device but I cannot
> figure out how to mmap this memory to User space as well so I can share this
> memory with the PCI device and my user space driver.
>
> What am I missing?
Why can't you call mmap() on the fd you created when you opened
/dev/uio? What happens when you do that?
thanks,
greg k-h
next prev parent reply other threads:[~2017-09-12 12:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-12 12:18 uio_dmem_genirq.c and DMA mapping to user space ? Joakim Tjernlund
2017-09-12 12:37 ` gregkh [this message]
2017-09-12 14:08 ` Joakim Tjernlund
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=20170912123716.GA19626@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Joakim.Tjernlund@infinera.com \
--cc=linux-kernel@vger.kernel.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