linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Hyun Kwon <hyun.kwon@xilinx.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<linux-kernel@vger.kernel.org>
Cc: Stefano Stabellini <stefanos@xilinx.com>,
	Hyun Kwon <hyun.kwon@xilinx.com>,
	Sonal Santan <sonals@xilinx.com>,
	Cyril Chemparathy <cyrilc@xilinx.com>,
	Michal Simek <michal.simek@xilinx.com>,
	dri-devel@lists.freedesktop.org,
	Jiaying Liang <jliang@xilinx.com>,
	linaro-mm-sig@lists.linaro.org,
	Sumit Semwal <sumit.semwal@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: [PATCH RFC 0/1] uio: Add dmabuf import ioctl
Date: Sat, 23 Feb 2019 12:28:16 -0800	[thread overview]
Message-ID: <1550953697-7288-1-git-send-email-hyun.kwon@xilinx.com> (raw)

Hi,

I'm looking to enable platform independent device driver stacks on
Linux. Currently, I have some driver built on top of Linux UIO [1],
and possibly there can be more of such drivers: ex, soft IP drivers
programmed on FPGA. Some device includes data movers such as DMA, and
that requires some mechanism to import external buffers and program
the data movers from user space.

Thus this patch set adds a couple of ioctls to import the dmabuf
and return required information back to user. This allows the user
drivers to use dmabuf compatible external buffers: ex, it's tested
with ION allocator.

I'd like to understand if this is right approach which can be used
to develop the user space software stacks further, especially because
- adding new ioctls to generic uio
- security concerns from exposing low level information: dma addr
For example, vfio isn't option as iommu may not be available for
all such devices on all platforms. So any feedback to move forward
would be appreciated.

Thanks,
-hyun

[1] https://patchwork.kernel.org/patch/10774761/

Hyun Kwon (1):
  uio: Add dma-buf import ioctls

 drivers/uio/Makefile         |   2 +-
 drivers/uio/uio.c            |  43 +++++++++
 drivers/uio/uio_dmabuf.c     | 210 +++++++++++++++++++++++++++++++++++++++++++
 drivers/uio/uio_dmabuf.h     |  26 ++++++
 include/uapi/linux/uio/uio.h |  33 +++++++
 5 files changed, 313 insertions(+), 1 deletion(-)
 create mode 100644 drivers/uio/uio_dmabuf.c
 create mode 100644 drivers/uio/uio_dmabuf.h
 create mode 100644 include/uapi/linux/uio/uio.h

-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2019-02-23 20:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-23 20:28 Hyun Kwon [this message]
2019-02-23 20:28 ` [PATCH RFC 1/1] uio: Add dma-buf import ioctls Hyun Kwon
2019-02-26 11:53   ` Greg Kroah-Hartman
2019-02-26 12:06     ` Daniel Vetter
2019-02-26 22:18       ` Hyun Kwon
2019-02-27 14:13         ` Daniel Vetter
2019-02-28  0:36           ` Hyun Kwon
2019-02-28 10:01             ` Daniel Vetter
2019-03-01  0:18               ` Hyun Kwon
2019-03-01  8:55                 ` Daniel Vetter
2019-02-26 22:16     ` Hyun Kwon

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=1550953697-7288-1-git-send-email-hyun.kwon@xilinx.com \
    --to=hyun.kwon@xilinx.com \
    --cc=cyrilc@xilinx.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jliang@xilinx.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=sonals@xilinx.com \
    --cc=stefanos@xilinx.com \
    --cc=sumit.semwal@linaro.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).