Re: [PATCH RESEND v2 0/8] Cache-coherent DMA access using UIO

2016-08-10 Thread Anup Patel
Hi Alex, On Thu, Aug 11, 2016 at 9:46 AM, Alex Williamson <alex.william...@redhat.com> wrote: > On Thu, 11 Aug 2016 09:30:19 +0530 > Anup Patel <anup.pa...@broadcom.com> wrote: > >> Hi Arnd, >> >> On Wed, Aug 10, 2016 at 9:25 PM, Arnd Bergmann <a...@arndb

Re: [PATCH RESEND v2 0/8] Cache-coherent DMA access using UIO

2016-08-10 Thread Anup Patel
Hi Arnd, On Wed, Aug 10, 2016 at 9:25 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Monday, August 8, 2016 11:22:29 AM CEST Anup Patel wrote: >> The goal of this patchset is to improve UIO framework and UIO dmem >> driver to allow cache-coherent DMA accesses from user-space

[PATCH RESEND v2 5/8] Documentation: Update documentation for UIO_MEM_PHYS_CACHE and UIO_MEM_DEVICE

2016-08-07 Thread Anup Patel
From: Ankit Jindal <thatsjin...@gmail.com> This patch updates UIO documentation for new mem region types UIO_MEM_PHYS_CACHE and UIO_MEM_DEVICE. Signed-off-by: Ankit Jindal <thatsjin...@gmail.com> Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- Documentation/DocBook/

[PATCH RESEND v2 7/8] uio: bind uio_dmem_genirq via OF

2016-08-07 Thread Anup Patel
<vikto...@rehivetech.com> Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- drivers/uio/uio_dmem_genirq.c | 162 +++--- 1 file changed, 135 insertions(+), 27 deletions(-) diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c inde

[PATCH RESEND v2 3/8] uio: Add new UIO_MEM_PHYS_CACHE type for mem regions

2016-08-07 Thread Anup Patel
m user space. Signed-off-by: Ankit Jindal <thatsjin...@gmail.com> Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- drivers/uio/uio.c | 16 +--- include/linux/uio_driver.h | 9 + 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/u

[PATCH RESEND v2 8/8] uio: Use new memtypes in uio_dmem_genirq

2016-08-07 Thread Anup Patel
This patch extends uio_dmem_genirq driver to use recently added memtypes as follows: 1. Use UIO_MEM_DEVICE memtype for MEM resources 2. Use UIO_MEM_PHYS_CACHE memtype for dynamic regions when UIO DT node is marked as DMA coherent. Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- d

[PATCH RESEND v2 6/8] uio: UIO_IRQ_NONE is a valid option for uioinfo->irq

2016-08-07 Thread Anup Patel
From: Jan Viktorin We can simplify handling of platform_get_irq into one place as it is acceptable to see UIO_IRQ_NONE instead of a valid IRQ number. Some devices don't have or don't need any interrupt to be handled. The same change has been already done for

[PATCH RESEND v2 4/8] uio: Add new UIO_MEM_DEVICE type for mem regions

2016-08-07 Thread Anup Patel
() to pgprot_noncached(). This patch introduces a new UIO mem region type UIO_MEM_DEVICE to represent device registers/memory. The UIO device drivers should prefer this new UIO mem region type for memory mapped device registers. Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- drivers/uio

[PATCH RESEND v2 1/8] uio: fix dmem_region_start computation

2016-08-07 Thread Anup Patel
apping regions and makes them useless. Fix this by computing dmem_region_start from the uiomem which points to the last used UIO mapping. Fixes: 0a0c3b5a24bd ("Add new uio device for dynamic memory allocation") Signed-off-by: Jan Viktorin <vikto...@rehivetech.com> Signed-off-b

[PATCH RESEND v2 0/8] Cache-coherent DMA access using UIO

2016-08-07 Thread Anup Patel
() - Get UIO dmem dynamic region details as module parameter instead of getting it from DT node Ankit Jindal (3): uio: code style cleanup uio: Add new UIO_MEM_PHYS_CACHE type for mem regions Documentation: Update documentation for UIO_MEM_PHYS_CACHE and UIO_MEM_DEVICE Anup Patel (2

[PATCH v2 0/8] Cache-coherent DMA access using UIO

2016-07-18 Thread Anup Patel
parameter instead of getting it from DT node Ankit Jindal (3): uio: code style cleanup uio: Add new UIO_MEM_PHYS_CACHE type for mem regions Documentation: Update documentation for UIO_MEM_PHYS_CACHE and UIO_MEM_DEVICE Anup Patel (2): uio: Add new UIO_MEM_DEVICE type for mem regions

[PATCH v2 4/8] uio: Add new UIO_MEM_DEVICE type for mem regions

2016-07-18 Thread Anup Patel
() to pgprot_noncached(). This patch introduces a new UIO mem region type UIO_MEM_DEVICE to represent device registers/memory. The UIO device drivers should prefer this new UIO mem region type for memory mapped device registers. Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- drivers/uio

[PATCH v2 2/8] uio: code style cleanup

2016-07-18 Thread Anup Patel
From: Ankit Jindal <thatsjin...@gmail.com> This patch fixes the indentation of switch-case block in uio driver. Signed-off-by: Ankit Jindal <thatsjin...@gmail.com> Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- drivers/uio/uio.c | 14 +++--- 1 file changed,

[PATCH v2 8/8] uio: Use new memtypes in uio_dmem_genirq

2016-07-18 Thread Anup Patel
This patch extends uio_dmem_genirq driver to use recently added memtypes as follows: 1. Use UIO_MEM_DEVICE memtype for MEM resources 2. Use UIO_MEM_PHYS_CACHE memtype for dynamic regions when UIO DT node is marked as DMA coherent. Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- d

[PATCH v2 5/8] Documentation: Update documentation for UIO_MEM_PHYS_CACHE and UIO_MEM_DEVICE

2016-07-18 Thread Anup Patel
From: Ankit Jindal <thatsjin...@gmail.com> This patch updates UIO documentation for new mem region types UIO_MEM_PHYS_CACHE and UIO_MEM_DEVICE. Signed-off-by: Ankit Jindal <thatsjin...@gmail.com> Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- Documentation/DocBook/

[PATCH v2 1/8] uio: fix dmem_region_start computation

2016-07-18 Thread Anup Patel
apping regions and makes them useless. Fix this by computing dmem_region_start from the uiomem which points to the last used UIO mapping. Fixes: 0a0c3b5a24bd ("Add new uio device for dynamic memory allocation") Signed-off-by: Jan Viktorin <vikto...@rehivetech.com> Signed-off-b

[PATCH v2 3/8] uio: Add new UIO_MEM_PHYS_CACHE type for mem regions

2016-07-18 Thread Anup Patel
m user space. Signed-off-by: Ankit Jindal <thatsjin...@gmail.com> Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- drivers/uio/uio.c | 16 +--- include/linux/uio_driver.h | 9 + 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/u

Re: [PATCH 7/8] uio: bind uio_dmem_genirq via OF

2016-07-17 Thread Anup Patel
On Fri, Jul 15, 2016 at 10:22 PM, Mark Rutland <mark.rutl...@arm.com> wrote: > On Fri, Jul 15, 2016 at 09:57:28PM +0530, Anup Patel wrote: >> On Fri, Jul 15, 2016 at 6:58 PM, Mark Rutland <mark.rutl...@arm.com> wrote: >> > On Fri, Jul 15, 2016 at 02:34:02PM +0530, A

Re: [PATCH 7/8] uio: bind uio_dmem_genirq via OF

2016-07-15 Thread Anup Patel
On Fri, Jul 15, 2016 at 6:58 PM, Mark Rutland <mark.rutl...@arm.com> wrote: > [adding devicetree list] > > On Fri, Jul 15, 2016 at 02:34:02PM +0530, Anup Patel wrote: >> From: Jan Viktorin <vikto...@rehivetech.com> >> >> The uio_dmem_genirq works i

Re: [PATCH 7/8] uio: bind uio_dmem_genirq via OF

2016-07-15 Thread Anup Patel
On Fri, Jul 15, 2016 at 3:15 PM, Russell King - ARM Linux <li...@armlinux.org.uk> wrote: > On Fri, Jul 15, 2016 at 02:34:02PM +0530, Anup Patel wrote: >> +static int uio_dmem_genirq_alloc_platdata(struct platform_device *pdev) >> +{ >> + struct uio_dmem_genir

[PATCH 1/8] uio: code style cleanup

2016-07-15 Thread Anup Patel
From: Ankit Jindal <thatsjin...@gmail.com> This patch fixes the indentation of switch-case block in uio driver. Signed-off-by: Ankit Jindal <thatsjin...@gmail.com> Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- drivers/uio/uio.c | 14 +++--- 1 file changed,

[PATCH 6/8] uio: UIO_IRQ_NONE is a valid option for uioinfo->irq

2016-07-15 Thread Anup Patel
From: Jan Viktorin We can simplify handling of platform_get_irq into one place as it is acceptable to see UIO_IRQ_NONE instead of a valid IRQ number. Some devices don't have or don't need any interrupt to be handled. The same change has been already done for

[PATCH 8/8] uio: Use new memtypes in uio_dmem_genirq

2016-07-15 Thread Anup Patel
This patch extends uio_dmem_genirq driver to use recently added memtypes as follows: 1. Use UIO_MEM_DEVICE memtype for MEM resources 2. Use UIO_MEM_PHYS_CACHE memtype for dynamic regions when UIO DT node is marked as DMA coherent. Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- d

[PATCH 5/8] uio: fix dmem_region_start computation

2016-07-15 Thread Anup Patel
From: Jan Viktorin The variable i contains a total number of resources (including IORESOURCE_IRQ). However, we want the dmem_region_start to point after the last resource of type IORESOURCE_MEM. The original behaviour leads (very likely) to skipping several UIO mapping

[PATCH 7/8] uio: bind uio_dmem_genirq via OF

2016-07-15 Thread Anup Patel
t_prop: This is name of OF property which will be used to specify number of dynamic regions in UIO DT node. 4) of_dmem_sizes_prop: This is name of OF property which will be used to specify sizes of each dynamic regions in UIO DT node. Signed-off-by: Jan Viktorin <vikto...@rehivetech.com> Signed-off-by

[PATCH 3/8] uio: Add new UIO_MEM_DEVICE type for mem regions

2016-07-15 Thread Anup Patel
() to pgprot_noncached(). This patch introduces a new UIO mem region type UIO_MEM_DEVICE to represent device registers/memory. The UIO device drivers should prefer this new UIO mem region type for memory mapped device registers. Signed-off-by: Anup Patel <anup.pa...@broadcom.com> --- drivers/uio

[PATCH 0/8] Cache-coherent DMA access using UIO

2016-07-15 Thread Anup Patel
documentation for UIO_MEM_PHYS_CACHE and UIO_MEM_DEVICE Anup Patel (2): uio: Add new UIO_MEM_DEVICE type for mem regions uio: Use new memtypes in uio_dmem_genirq Jan Viktorin (3): uio: fix dmem_region_start computation uio: UIO_IRQ_NONE is a valid option for uioinfo->irq uio: b