linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Add UIO device supporting dynamic memory allocation
@ 2012-09-10 10:30 Damian Hobson-Garcia
  2012-09-12  5:29 ` Damian Hobson-Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: Damian Hobson-Garcia @ 2012-09-10 10:30 UTC (permalink / raw)
  To: linux-sh

Hello all,

I've been using this device on the mackerel board for allocation/deallocation
of memory regions through the IOMMU (IPMMU) via the dma-mapping API, but
it can also be used by userspace drivers for accessing CMA memory
regions. I don't know if it's better to try to add this functionality into
the core uio driver or not, so for now I've kept all dynamic memory handling
in the specific device driver.

The number and size of the dynamically allocatable regions is defined
statically in the device platform data, and the actually memory is
allocated and deallocated when the device is opened/closed.

Details of the dynamically allocated regions are available from sysfs in
exactly the same was as for static regions. The total number of
dynamic and static regions combined cannot exceed MAX_UIO_MAPS.

Any comments, especially with regard to exposing the dma-mapping API to
userspace in this way, would be greatly appreciated.

Damian Hobson-Garcia (2):
  Add new uio device for dynamic memory allocation
  ARM: shmobile: sh7372: Change VPU UIO to uio_dmem_genirq

 arch/arm/mach-shmobile/setup-sh7372.c         |   19 +-
 drivers/uio/Kconfig                           |   16 ++
 drivers/uio/Makefile                          |    1 +
 drivers/uio/uio_dmem_genirq.c                 |  356 +++++++++++++++++++++++++
 include/linux/platform_data/uio_dmem_genirq.h |   26 ++
 5 files changed, 413 insertions(+), 5 deletions(-)
 create mode 100644 drivers/uio/uio_dmem_genirq.c
 create mode 100644 include/linux/platform_data/uio_dmem_genirq.h

-- 
1.7.5.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-12 22:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-10 10:30 [RFC PATCH 0/2] Add UIO device supporting dynamic memory allocation Damian Hobson-Garcia
2012-09-12  5:29 ` Damian Hobson-Garcia
2012-09-12  5:29   ` [RFC PATCH 1/2] Add new uio device for " Damian Hobson-Garcia
2012-09-12  5:29   ` [RFC PATCH 2/2] ARM: shmobile: sh7372: Change VPU UIO to uio_dmem_genirq Damian Hobson-Garcia
2012-09-12 22:11   ` [RFC PATCH 0/2] Add UIO device supporting dynamic memory allocation Hans J. Koch

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).