[PATCHv8 08/10] ARM: dma-mapping: remove redundant code and cleanup

2012-04-10 Thread Marek Szyprowski
This patch just performs a global cleanup in DMA mapping implementation
for ARM architecture. Some of the tiny helper functions have been moved
to the caller code, some have been merged together.

Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 arch/arm/mm/dma-mapping.c |   88 
 1 files changed, 24 insertions(+), 64 deletions(-)

diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 695c219..485c693 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -40,64 +40,12 @@
  * the CPU does do speculative prefetches, which means we clean caches
  * before transfers and delay cache invalidation until transfer completion.
  *
- * Private support functions: these are not part of the API and are
- * liable to change.  Drivers must not use these.
  */
-static inline void __dma_single_cpu_to_dev(const void *kaddr, size_t size,
-   enum dma_data_direction dir)
-{
-   extern void ___dma_single_cpu_to_dev(const void *, size_t,
-   enum dma_data_direction);
-
-   if (!arch_is_coherent())
-   ___dma_single_cpu_to_dev(kaddr, size, dir);
-}
-
-static inline void __dma_single_dev_to_cpu(const void *kaddr, size_t size,
-   enum dma_data_direction dir)
-{
-   extern void ___dma_single_dev_to_cpu(const void *, size_t,
-   enum dma_data_direction);
-
-   if (!arch_is_coherent())
-   ___dma_single_dev_to_cpu(kaddr, size, dir);
-}
-
-static inline void __dma_page_cpu_to_dev(struct page *page, unsigned long off,
-   size_t size, enum dma_data_direction dir)
-{
-   extern void ___dma_page_cpu_to_dev(struct page *, unsigned long,
+static void __dma_page_cpu_to_dev(struct page *, unsigned long,
size_t, enum dma_data_direction);
-
-   if (!arch_is_coherent())
-   ___dma_page_cpu_to_dev(page, off, size, dir);
-}
-
-static inline void __dma_page_dev_to_cpu(struct page *page, unsigned long off,
-   size_t size, enum dma_data_direction dir)
-{
-   extern void ___dma_page_dev_to_cpu(struct page *, unsigned long,
+static void __dma_page_dev_to_cpu(struct page *, unsigned long,
size_t, enum dma_data_direction);
 
-   if (!arch_is_coherent())
-   ___dma_page_dev_to_cpu(page, off, size, dir);
-}
-
-
-static inline dma_addr_t __dma_map_page(struct device *dev, struct page *page,
-unsigned long offset, size_t size, enum dma_data_direction dir)
-{
-   __dma_page_cpu_to_dev(page, offset, size, dir);
-   return pfn_to_dma(dev, page_to_pfn(page)) + offset;
-}
-
-static inline void __dma_unmap_page(struct device *dev, dma_addr_t handle,
-   size_t size, enum dma_data_direction dir)
-{
-   __dma_page_dev_to_cpu(pfn_to_page(dma_to_pfn(dev, handle)),
-   handle  ~PAGE_MASK, size, dir);
-}
-
 /**
  * arm_dma_map_page - map a portion of a page for streaming DMA
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
@@ -112,11 +60,13 @@ static inline void __dma_unmap_page(struct device *dev, 
dma_addr_t handle,
  * The device owns this memory once this call has completed.  The CPU
  * can regain ownership by calling dma_unmap_page().
  */
-static inline dma_addr_t arm_dma_map_page(struct device *dev, struct page 
*page,
+static dma_addr_t arm_dma_map_page(struct device *dev, struct page *page,
 unsigned long offset, size_t size, enum dma_data_direction dir,
 struct dma_attrs *attrs)
 {
-   return __dma_map_page(dev, page, offset, size, dir);
+   if (!arch_is_coherent())
+   __dma_page_cpu_to_dev(page, offset, size, dir);
+   return pfn_to_dma(dev, page_to_pfn(page)) + offset;
 }
 
 /**
@@ -133,27 +83,31 @@ static inline dma_addr_t arm_dma_map_page(struct device 
*dev, struct page *page,
  * After this call, reads by the CPU to the buffer are guaranteed to see
  * whatever the device wrote there.
  */
-static inline void arm_dma_unmap_page(struct device *dev, dma_addr_t handle,
+static void arm_dma_unmap_page(struct device *dev, dma_addr_t handle,
size_t size, enum dma_data_direction dir,
struct dma_attrs *attrs)
 {
-   __dma_unmap_page(dev, handle, size, dir);
+   if (!arch_is_coherent())
+   __dma_page_dev_to_cpu(pfn_to_page(dma_to_pfn(dev, handle)),
+ handle  ~PAGE_MASK, size, dir);
 }
 
-static inline void arm_dma_sync_single_for_cpu(struct device *dev,
+static void arm_dma_sync_single_for_cpu(struct device *dev,
dma_addr_t handle, size_t size, enum dma_data_direction dir)
 {
unsigned int offset = handle  (PAGE_SIZE - 1);
struct page *page = pfn_to_page(dma_to_pfn(dev, handle-offset));
-   __dma_page_dev_to_cpu(page, offset, size, dir);
+   if (!arch_is_coherent())
+   __dma_page_dev_to_cpu(page, offset, 

[PATCHv8 01/10] common: add dma_mmap_from_coherent() function

2012-04-10 Thread Marek Szyprowski
Add a common helper for dma-mapping core for mapping a coherent buffer
to userspace.

Reported-by: Subash Patel subas...@gmail.com
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 drivers/base/dma-coherent.c|   42 
 include/asm-generic/dma-coherent.h |4 ++-
 2 files changed, 45 insertions(+), 1 deletions(-)

diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c
index bb0025c..1b85949 100644
--- a/drivers/base/dma-coherent.c
+++ b/drivers/base/dma-coherent.c
@@ -10,6 +10,7 @@
 struct dma_coherent_mem {
void*virt_base;
dma_addr_t  device_base;
+   phys_addr_t pfn_base;
int size;
int flags;
unsigned long   *bitmap;
@@ -44,6 +45,7 @@ int dma_declare_coherent_memory(struct device *dev, 
dma_addr_t bus_addr,
 
dev-dma_mem-virt_base = mem_base;
dev-dma_mem-device_base = device_addr;
+   dev-dma_mem-pfn_base = PFN_DOWN(bus_addr);
dev-dma_mem-size = pages;
dev-dma_mem-flags = flags;
 
@@ -176,3 +178,43 @@ int dma_release_from_coherent(struct device *dev, int 
order, void *vaddr)
return 0;
 }
 EXPORT_SYMBOL(dma_release_from_coherent);
+
+/**
+ * dma_mmap_from_coherent() - try to mmap the memory allocated from
+ * per-device coherent memory pool to userspace
+ * @dev:   device from which the memory was allocated
+ * @vma:   vm_area for the userspace memory
+ * @vaddr: cpu address returned by dma_alloc_from_coherent
+ * @size:  size of the memory buffer allocated by dma_alloc_from_coherent
+ *
+ * This checks whether the memory was allocated from the per-device
+ * coherent memory pool and if so, maps that memory to the provided vma.
+ *
+ * Returns 1 if we correctly mapped the memory, or 0 if
+ * dma_release_coherent() should proceed with mapping memory from
+ * generic pools.
+ */
+int dma_mmap_from_coherent(struct device *dev, struct vm_area_struct *vma,
+  void *vaddr, size_t size, int *ret)
+{
+   struct dma_coherent_mem *mem = dev ? dev-dma_mem : NULL;
+
+   if (mem  vaddr = mem-virt_base  vaddr + size =
+  (mem-virt_base + (mem-size  PAGE_SHIFT))) {
+   unsigned long off = vma-vm_pgoff;
+   int start = (vaddr - mem-virt_base)  PAGE_SHIFT;
+   int user_count = (vma-vm_end - vma-vm_start)  PAGE_SHIFT;
+   int count = size  PAGE_SHIFT;
+
+   *ret = -ENXIO;
+   if (off  count  user_count = count - off) {
+   unsigned pfn = mem-pfn_base + start + off;
+   *ret = remap_pfn_range(vma, vma-vm_start, pfn,
+  user_count  PAGE_SHIFT,
+  vma-vm_page_prot);
+   }
+   return 1;
+   }
+   return 0;
+}
+EXPORT_SYMBOL(dma_mmap_from_coherent);
diff --git a/include/asm-generic/dma-coherent.h 
b/include/asm-generic/dma-coherent.h
index 85a3ffa..abfb268 100644
--- a/include/asm-generic/dma-coherent.h
+++ b/include/asm-generic/dma-coherent.h
@@ -3,13 +3,15 @@
 
 #ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT
 /*
- * These two functions are only for dma allocator.
+ * These three functions are only for dma allocator.
  * Don't use them in device drivers.
  */
 int dma_alloc_from_coherent(struct device *dev, ssize_t size,
   dma_addr_t *dma_handle, void **ret);
 int dma_release_from_coherent(struct device *dev, int order, void *vaddr);
 
+int dma_mmap_from_coherent(struct device *dev, struct vm_area_struct *vma,
+   void *cpu_addr, size_t size, int *ret);
 /*
  * Standard interface
  */
-- 
1.7.1.569.g6f426

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


[PATCHv8 05/10] ARM: dma-mapping: use asm-generic/dma-mapping-common.h

2012-04-10 Thread Marek Szyprowski
This patch modifies dma-mapping implementation on ARM architecture to
use common dma_map_ops structure and asm-generic/dma-mapping-common.h
helpers.

Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 arch/arm/Kconfig   |1 +
 arch/arm/include/asm/device.h  |1 +
 arch/arm/include/asm/dma-mapping.h |  196 +---
 arch/arm/mm/dma-mapping.c  |  148 ---
 4 files changed, 115 insertions(+), 231 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cf006d4..0fd27d4 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -4,6 +4,7 @@ config ARM
select HAVE_AOUT
select HAVE_DMA_API_DEBUG
select HAVE_IDE if PCI || ISA || PCMCIA
+   select HAVE_DMA_ATTRS
select HAVE_MEMBLOCK
select RTC_LIB
select SYS_SUPPORTS_APM_EMULATION
diff --git a/arch/arm/include/asm/device.h b/arch/arm/include/asm/device.h
index 7aa3680..6e2cb0e 100644
--- a/arch/arm/include/asm/device.h
+++ b/arch/arm/include/asm/device.h
@@ -7,6 +7,7 @@
 #define ASMARM_DEVICE_H
 
 struct dev_archdata {
+   struct dma_map_ops  *dma_ops;
 #ifdef CONFIG_DMABOUNCE
struct dmabounce_device_info *dmabounce;
 #endif
diff --git a/arch/arm/include/asm/dma-mapping.h 
b/arch/arm/include/asm/dma-mapping.h
index 02d651f..424b67a 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -11,6 +11,27 @@
 #include asm/memory.h
 
 #define ARM_DMA_ERROR  (~0)
+extern struct dma_map_ops arm_dma_ops;
+
+static inline struct dma_map_ops *get_dma_ops(struct device *dev)
+{
+   if (dev  dev-archdata.dma_ops)
+   return dev-archdata.dma_ops;
+   return arm_dma_ops;
+}
+
+static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops)
+{
+   BUG_ON(!dev);
+   dev-archdata.dma_ops = ops;
+}
+
+#include asm-generic/dma-mapping-common.h
+
+static inline int dma_set_mask(struct device *dev, u64 mask)
+{
+   return get_dma_ops(dev)-set_dma_mask(dev, mask);
+}
 
 #ifdef __arch_page_to_dma
 #error Please update to __arch_pfn_to_dma
@@ -119,7 +140,6 @@ static inline void __dma_page_dev_to_cpu(struct page *page, 
unsigned long off,
 
 extern int dma_supported(struct device *, u64);
 extern int dma_set_mask(struct device *, u64);
-
 /*
  * DMA errors are defined by all-bits-set in the DMA address.
  */
@@ -297,179 +317,17 @@ static inline void __dma_unmap_page(struct device *dev, 
dma_addr_t handle,
 }
 #endif /* CONFIG_DMABOUNCE */
 
-/**
- * dma_map_single - map a single buffer for streaming DMA
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @cpu_addr: CPU direct mapped address of buffer
- * @size: size of buffer to map
- * @dir: DMA transfer direction
- *
- * Ensure that any data held in the cache is appropriately discarded
- * or written back.
- *
- * The device owns this memory once this call has completed.  The CPU
- * can regain ownership by calling dma_unmap_single() or
- * dma_sync_single_for_cpu().
- */
-static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr,
-   size_t size, enum dma_data_direction dir)
-{
-   unsigned long offset;
-   struct page *page;
-   dma_addr_t addr;
-
-   BUG_ON(!virt_addr_valid(cpu_addr));
-   BUG_ON(!virt_addr_valid(cpu_addr + size - 1));
-   BUG_ON(!valid_dma_direction(dir));
-
-   page = virt_to_page(cpu_addr);
-   offset = (unsigned long)cpu_addr  ~PAGE_MASK;
-   addr = __dma_map_page(dev, page, offset, size, dir);
-   debug_dma_map_page(dev, page, offset, size, dir, addr, true);
-
-   return addr;
-}
-
-/**
- * dma_map_page - map a portion of a page for streaming DMA
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @page: page that buffer resides in
- * @offset: offset into page for start of buffer
- * @size: size of buffer to map
- * @dir: DMA transfer direction
- *
- * Ensure that any data held in the cache is appropriately discarded
- * or written back.
- *
- * The device owns this memory once this call has completed.  The CPU
- * can regain ownership by calling dma_unmap_page().
- */
-static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
-unsigned long offset, size_t size, enum dma_data_direction dir)
-{
-   dma_addr_t addr;
-
-   BUG_ON(!valid_dma_direction(dir));
-
-   addr = __dma_map_page(dev, page, offset, size, dir);
-   debug_dma_map_page(dev, page, offset, size, dir, addr, false);
-
-   return addr;
-}
-
-/**
- * dma_unmap_single - unmap a single buffer previously mapped
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @handle: DMA address of buffer
- * @size: size of buffer (same as passed to dma_map_single)
- * @dir: DMA transfer direction (same as passed to dma_map_single)
- *
- * Unmap a single streaming 

[PATCHv8 04/10] ARM: dma-mapping: remove offset parameter to prepare for generic dma_ops

2012-04-10 Thread Marek Szyprowski
This patch removes the need for offset parameter in dma bounce
functions. This is required to let dma-mapping framework on ARM
architecture use common, generic dma-mapping helpers.

Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 arch/arm/common/dmabounce.c|   13 +--
 arch/arm/include/asm/dma-mapping.h |   67 +--
 arch/arm/mm/dma-mapping.c  |4 +-
 3 files changed, 45 insertions(+), 39 deletions(-)

diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index a1abdc9..c9f54b6 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -173,7 +173,8 @@ find_safe_buffer(struct dmabounce_device_info *device_info, 
dma_addr_t safe_dma_
read_lock_irqsave(device_info-lock, flags);
 
list_for_each_entry(b, device_info-safe_buffers, node)
-   if (b-safe_dma_addr == safe_dma_addr) {
+   if (b-safe_dma_addr = safe_dma_addr 
+   b-safe_dma_addr + b-size  safe_dma_addr) {
rb = b;
break;
}
@@ -362,9 +363,10 @@ void __dma_unmap_page(struct device *dev, dma_addr_t 
dma_addr, size_t size,
 EXPORT_SYMBOL(__dma_unmap_page);
 
 int dmabounce_sync_for_cpu(struct device *dev, dma_addr_t addr,
-   unsigned long off, size_t sz, enum dma_data_direction dir)
+   size_t sz, enum dma_data_direction dir)
 {
struct safe_buffer *buf;
+   unsigned long off;
 
dev_dbg(dev, %s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n,
__func__, addr, off, sz, dir);
@@ -373,6 +375,8 @@ int dmabounce_sync_for_cpu(struct device *dev, dma_addr_t 
addr,
if (!buf)
return 1;
 
+   off = addr - buf-safe_dma_addr;
+
BUG_ON(buf-direction != dir);
 
dev_dbg(dev, %s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n,
@@ -391,9 +395,10 @@ int dmabounce_sync_for_cpu(struct device *dev, dma_addr_t 
addr,
 EXPORT_SYMBOL(dmabounce_sync_for_cpu);
 
 int dmabounce_sync_for_device(struct device *dev, dma_addr_t addr,
-   unsigned long off, size_t sz, enum dma_data_direction dir)
+   size_t sz, enum dma_data_direction dir)
 {
struct safe_buffer *buf;
+   unsigned long off;
 
dev_dbg(dev, %s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n,
__func__, addr, off, sz, dir);
@@ -402,6 +407,8 @@ int dmabounce_sync_for_device(struct device *dev, 
dma_addr_t addr,
if (!buf)
return 1;
 
+   off = addr - buf-safe_dma_addr;
+
BUG_ON(buf-direction != dir);
 
dev_dbg(dev, %s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n,
diff --git a/arch/arm/include/asm/dma-mapping.h 
b/arch/arm/include/asm/dma-mapping.h
index 3dbec1d..02d651f 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -266,19 +266,17 @@ extern void __dma_unmap_page(struct device *, dma_addr_t, 
size_t,
 /*
  * Private functions
  */
-int dmabounce_sync_for_cpu(struct device *, dma_addr_t, unsigned long,
-   size_t, enum dma_data_direction);
-int dmabounce_sync_for_device(struct device *, dma_addr_t, unsigned long,
-   size_t, enum dma_data_direction);
+int dmabounce_sync_for_cpu(struct device *, dma_addr_t, size_t, enum 
dma_data_direction);
+int dmabounce_sync_for_device(struct device *, dma_addr_t, size_t, enum 
dma_data_direction);
 #else
 static inline int dmabounce_sync_for_cpu(struct device *d, dma_addr_t addr,
-   unsigned long offset, size_t size, enum dma_data_direction dir)
+   size_t size, enum dma_data_direction dir)
 {
return 1;
 }
 
 static inline int dmabounce_sync_for_device(struct device *d, dma_addr_t addr,
-   unsigned long offset, size_t size, enum dma_data_direction dir)
+   size_t size, enum dma_data_direction dir)
 {
return 1;
 }
@@ -401,6 +399,33 @@ static inline void dma_unmap_page(struct device *dev, 
dma_addr_t handle,
__dma_unmap_page(dev, handle, size, dir);
 }
 
+
+static inline void dma_sync_single_for_cpu(struct device *dev,
+   dma_addr_t handle, size_t size, enum dma_data_direction dir)
+{
+   BUG_ON(!valid_dma_direction(dir));
+
+   debug_dma_sync_single_for_cpu(dev, handle, size, dir);
+
+   if (!dmabounce_sync_for_cpu(dev, handle, size, dir))
+   return;
+
+   __dma_single_dev_to_cpu(dma_to_virt(dev, handle), size, dir);
+}
+
+static inline void dma_sync_single_for_device(struct device *dev,
+   dma_addr_t handle, size_t size, enum dma_data_direction dir)
+{
+   BUG_ON(!valid_dma_direction(dir));
+
+   debug_dma_sync_single_for_device(dev, handle, size, dir);
+
+   if (!dmabounce_sync_for_device(dev, handle, size, dir))
+   return;
+
+   __dma_single_cpu_to_dev(dma_to_virt(dev, handle), size, dir);
+}
+
 /**
  * dma_sync_single_range_for_cpu
  * @dev: 

[PATCHv8 09/10] ARM: dma-mapping: use alloc, mmap, free from dma_ops

2012-04-10 Thread Marek Szyprowski
This patch converts dma_alloc/free/mmap_{coherent,writecombine}
functions to use generic alloc/free/mmap methods from dma_map_ops
structure. A new DMA_ATTR_WRITE_COMBINE DMA attribute have been
introduced to implement writecombine methods.

Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 arch/arm/common/dmabounce.c|3 +
 arch/arm/include/asm/dma-mapping.h |  107 ++--
 arch/arm/mm/dma-mapping.c  |   54 ++
 3 files changed, 98 insertions(+), 66 deletions(-)

diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index 119f487..dbae5ad 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -449,6 +449,9 @@ static int dmabounce_set_mask(struct device *dev, u64 
dma_mask)
 }
 
 static struct dma_map_ops dmabounce_ops = {
+   .alloc  = arm_dma_alloc,
+   .free   = arm_dma_free,
+   .mmap   = arm_dma_mmap,
.map_page   = dmabounce_map_page,
.unmap_page = dmabounce_unmap_page,
.sync_single_for_cpu= dmabounce_sync_for_cpu,
diff --git a/arch/arm/include/asm/dma-mapping.h 
b/arch/arm/include/asm/dma-mapping.h
index 5f35f22..d56d6d2 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -5,6 +5,7 @@
 
 #include linux/mm_types.h
 #include linux/scatterlist.h
+#include linux/dma-attrs.h
 #include linux/dma-debug.h
 
 #include asm-generic/dma-coherent.h
@@ -110,68 +111,115 @@ static inline void dma_free_noncoherent(struct device 
*dev, size_t size,
 extern int dma_supported(struct device *dev, u64 mask);
 
 /**
- * dma_alloc_coherent - allocate consistent memory for DMA
+ * arm_dma_alloc - allocate consistent memory for DMA
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @size: required memory size
  * @handle: bus-specific DMA address
+ * @attrs: optinal attributes that specific mapping properties
  *
- * Allocate some uncached, unbuffered memory for a device for
- * performing DMA.  This function allocates pages, and will
- * return the CPU-viewed address, and sets @handle to be the
- * device-viewed address.
+ * Allocate some memory for a device for performing DMA.  This function
+ * allocates pages, and will return the CPU-viewed address, and sets @handle
+ * to be the device-viewed address.
  */
-extern void *dma_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t);
+extern void *arm_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
+  gfp_t gfp, struct dma_attrs *attrs);
+
+#define dma_alloc_coherent(d, s, h, f) dma_alloc_attrs(d, s, h, f, NULL)
+
+static inline void *dma_alloc_attrs(struct device *dev, size_t size,
+  dma_addr_t *dma_handle, gfp_t flag,
+  struct dma_attrs *attrs)
+{
+   struct dma_map_ops *ops = get_dma_ops(dev);
+   void *cpu_addr;
+   BUG_ON(!ops);
+
+   cpu_addr = ops-alloc(dev, size, dma_handle, flag, attrs);
+   debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr);
+   return cpu_addr;
+}
 
 /**
- * dma_free_coherent - free memory allocated by dma_alloc_coherent
+ * arm_dma_free - free memory allocated by arm_dma_alloc
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @size: size of memory originally requested in dma_alloc_coherent
  * @cpu_addr: CPU-view address returned from dma_alloc_coherent
  * @handle: device-view address returned from dma_alloc_coherent
+ * @attrs: optinal attributes that specific mapping properties
  *
  * Free (and unmap) a DMA buffer previously allocated by
- * dma_alloc_coherent().
+ * arm_dma_alloc().
  *
  * References to memory and mappings associated with cpu_addr/handle
  * during and after this call executing are illegal.
  */
-extern void dma_free_coherent(struct device *, size_t, void *, dma_addr_t);
+extern void arm_dma_free(struct device *dev, size_t size, void *cpu_addr,
+dma_addr_t handle, struct dma_attrs *attrs);
+
+#define dma_free_coherent(d, s, c, h) dma_free_attrs(d, s, c, h, NULL)
+
+static inline void dma_free_attrs(struct device *dev, size_t size,
+void *cpu_addr, dma_addr_t dma_handle,
+struct dma_attrs *attrs)
+{
+   struct dma_map_ops *ops = get_dma_ops(dev);
+   BUG_ON(!ops);
+
+   debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
+   ops-free(dev, size, cpu_addr, dma_handle, attrs);
+}
 
 /**
- * dma_mmap_coherent - map a coherent DMA allocation into user space
+ * arm_dma_mmap - map a coherent DMA allocation into user space
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @vma: vm_area_struct describing requested user mapping
  * @cpu_addr: kernel CPU-view address 

[PATCHv8 06/10] ARM: dma-mapping: implement dma sg methods on top of any generic dma ops

2012-04-10 Thread Marek Szyprowski
This patch converts all dma_sg methods to be generic (independent of the
current DMA mapping implementation for ARM architecture). All dma sg
operations are now implemented on top of respective
dma_map_page/dma_sync_single_for* operations from dma_map_ops structure.

Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 arch/arm/mm/dma-mapping.c |   43 +++
 1 files changed, 19 insertions(+), 24 deletions(-)

diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 4841fec..d7137bd 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -619,7 +619,7 @@ void ___dma_page_dev_to_cpu(struct page *page, unsigned 
long off,
 EXPORT_SYMBOL(___dma_page_dev_to_cpu);
 
 /**
- * dma_map_sg - map a set of SG buffers for streaming mode DMA
+ * arm_dma_map_sg - map a set of SG buffers for streaming mode DMA
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @sg: list of buffers
  * @nents: number of buffers to map
@@ -637,12 +637,13 @@ EXPORT_SYMBOL(___dma_page_dev_to_cpu);
 int arm_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
enum dma_data_direction dir, struct dma_attrs *attrs)
 {
+   struct dma_map_ops *ops = get_dma_ops(dev);
struct scatterlist *s;
int i, j;
 
for_each_sg(sg, s, nents, i) {
-   s-dma_address = __dma_map_page(dev, sg_page(s), s-offset,
-   s-length, dir);
+   s-dma_address = ops-map_page(dev, sg_page(s), s-offset,
+   s-length, dir, attrs);
if (dma_mapping_error(dev, s-dma_address))
goto bad_mapping;
}
@@ -650,12 +651,12 @@ int arm_dma_map_sg(struct device *dev, struct scatterlist 
*sg, int nents,
 
  bad_mapping:
for_each_sg(sg, s, i, j)
-   __dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir);
+   ops-unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir, 
attrs);
return 0;
 }
 
 /**
- * dma_unmap_sg - unmap a set of SG buffers mapped by dma_map_sg
+ * arm_dma_unmap_sg - unmap a set of SG buffers mapped by dma_map_sg
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @sg: list of buffers
  * @nents: number of buffers to unmap (same as was passed to dma_map_sg)
@@ -667,15 +668,17 @@ int arm_dma_map_sg(struct device *dev, struct scatterlist 
*sg, int nents,
 void arm_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
enum dma_data_direction dir, struct dma_attrs *attrs)
 {
+   struct dma_map_ops *ops = get_dma_ops(dev);
struct scatterlist *s;
+
int i;
 
for_each_sg(sg, s, nents, i)
-   __dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir);
+   ops-unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir, 
attrs);
 }
 
 /**
- * dma_sync_sg_for_cpu
+ * arm_dma_sync_sg_for_cpu
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @sg: list of buffers
  * @nents: number of buffers to map (returned from dma_map_sg)
@@ -684,21 +687,17 @@ void arm_dma_unmap_sg(struct device *dev, struct 
scatterlist *sg, int nents,
 void arm_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction dir)
 {
+   struct dma_map_ops *ops = get_dma_ops(dev);
struct scatterlist *s;
int i;
 
-   for_each_sg(sg, s, nents, i) {
-   if (!dmabounce_sync_for_cpu(dev, sg_dma_address(s),
-   sg_dma_len(s), dir))
-   continue;
-
-   __dma_page_dev_to_cpu(sg_page(s), s-offset,
- s-length, dir);
-   }
+   for_each_sg(sg, s, nents, i)
+   ops-sync_single_for_cpu(dev, sg_dma_address(s), s-length,
+dir);
 }
 
 /**
- * dma_sync_sg_for_device
+ * arm_dma_sync_sg_for_device
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @sg: list of buffers
  * @nents: number of buffers to map (returned from dma_map_sg)
@@ -707,17 +706,13 @@ void arm_dma_sync_sg_for_cpu(struct device *dev, struct 
scatterlist *sg,
 void arm_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction dir)
 {
+   struct dma_map_ops *ops = get_dma_ops(dev);
struct scatterlist *s;
int i;
 
-   for_each_sg(sg, s, nents, i) {
-   if (!dmabounce_sync_for_device(dev, sg_dma_address(s),
-   sg_dma_len(s), dir))
-   continue;
-
-   __dma_page_cpu_to_dev(sg_page(s), s-offset,
- s-length, dir);
-   }
+   

Re: [PATCHv8 02/10] ARM: dma-mapping: use pr_* instread of printk

2012-04-10 Thread Arnd Bergmann
On Tuesday 10 April 2012, Marek Szyprowski wrote:
 
 Replace all calls to printk with pr_* functions family.
 
 Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
 Acked-by: Kyungmin Park kyungmin.p...@samsung.com

Acked-by: Arnd Bergmann a...@arndb.de
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCHv8 05/10] ARM: dma-mapping: use asm-generic/dma-mapping-common.h

2012-04-10 Thread Arnd Bergmann
On Tuesday 10 April 2012, Marek Szyprowski wrote:
 This patch modifies dma-mapping implementation on ARM architecture to
 use common dma_map_ops structure and asm-generic/dma-mapping-common.h
 helpers.
 
 Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
 Acked-by: Kyungmin Park kyungmin.p...@samsung.com
 ---
  arch/arm/Kconfig   |1 +
  arch/arm/include/asm/device.h  |1 +
  arch/arm/include/asm/dma-mapping.h |  196 
 +---
  arch/arm/mm/dma-mapping.c  |  148 ---
  4 files changed, 115 insertions(+), 231 deletions(-)

Looks good in principle. One question: Now that many of the functions are only
used in the dma_map_ops, can you make them 'static' instead?

Arnd
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCHv8 10/10] ARM: dma-mapping: add support for IOMMU mapper

2012-04-10 Thread Arnd Bergmann
On Tuesday 10 April 2012, Marek Szyprowski wrote:
 +/**
 + * arm_iommu_create_mapping
 + * @bus: pointer to the bus holding the client device (for IOMMU calls)
 + * @base: start address of the valid IO address space
 + * @size: size of the valid IO address space
 + * @order: accuracy of the IO addresses allocations
 + *
 + * Creates a mapping structure which holds information about used/unused
 + * IO address ranges, which is required to perform memory allocation and
 + * mapping with IOMMU aware functions.
 + *
 + * The client device need to be attached to the mapping with
 + * arm_iommu_attach_device function.
 + */
 +struct dma_iommu_mapping *
 +arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size,
 +int order)
 +{
 +   unsigned int count = size  (PAGE_SHIFT + order);
 +   unsigned int bitmap_size = BITS_TO_LONGS(count) * sizeof(long);
 +   struct dma_iommu_mapping *mapping;
 +   int err = -ENOMEM;
 +
 +   if (!count)
 +   return ERR_PTR(-EINVAL);
 +
 +   mapping = kzalloc(sizeof(struct dma_iommu_mapping), GFP_KERNEL);
 +   if (!mapping)
 +   goto err;
 +
 +   mapping-bitmap = kzalloc(bitmap_size, GFP_KERNEL);
 +   if (!mapping-bitmap)
 +   goto err2;
 +
 +   mapping-base = base;
 +   mapping-bits = BITS_PER_BYTE * bitmap_size;
 +   mapping-order = order;
 +   spin_lock_init(mapping-lock);
 +
 +   mapping-domain = iommu_domain_alloc(bus);
 +   if (!mapping-domain)
 +   goto err3;
 +
 +   kref_init(mapping-kref);
 +   return mapping;
 +err3:
 +   kfree(mapping-bitmap);
 +err2:
 +   kfree(mapping);
 +err:
 +   return ERR_PTR(err);
 +}
 +EXPORT_SYMBOL(arm_iommu_create_mapping);

I don't understand this function, mostly I guess because you have not
provided any users. A few questions here:

* What is ARM specific about it that it is named arm_iommu_create_mapping?
  Isn't this completely generic, at least on the interface side?

* Why is this exported to modules? Which device drivers do you expect
  to call it?

* Why do you pass the bus_type in here? That seems like the completely
  wrong thing to do when all devices are on the same bus type (e.g.
  amba or platform) but are connected to different instances that each
  have their own iommu. I guess this is a question for Jörg, because the
  base iommu interface provides iommu_domain_alloc().

Arnd
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCHv8 09/10] ARM: dma-mapping: use alloc, mmap, free from dma_ops

2012-04-10 Thread Arnd Bergmann
On Tuesday 10 April 2012, Marek Szyprowski wrote:
 This patch converts dma_alloc/free/mmap_{coherent,writecombine}
 functions to use generic alloc/free/mmap methods from dma_map_ops
 structure. A new DMA_ATTR_WRITE_COMBINE DMA attribute have been
 introduced to implement writecombine methods.
 
 Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
 Acked-by: Kyungmin Park kyungmin.p...@samsung.com

Acked-by: Arnd Bergmann a...@arndb.de
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCHv8 08/10] ARM: dma-mapping: remove redundant code and cleanup

2012-04-10 Thread Arnd Bergmann
On Tuesday 10 April 2012, Marek Szyprowski wrote:
 
 This patch just performs a global cleanup in DMA mapping implementation
 for ARM architecture. Some of the tiny helper functions have been moved
 to the caller code, some have been merged together.
 
 Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
 Acked-by: Kyungmin Park kyungmin.p...@samsung.com

Acked-by: Arnd Bergmann a...@arndb.de
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCHv8 07/10] ARM: dma-mapping: move all dma bounce code to separate dma ops structure

2012-04-10 Thread Arnd Bergmann
On Tuesday 10 April 2012, Marek Szyprowski wrote:
 This patch removes dma bounce hooks from the common dma mapping
 implementation on ARM architecture and creates a separate set of
 dma_map_ops for dma bounce devices.
 
 Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
 Acked-by: Kyungmin Park kyungmin.p...@samsung.com

I could be misunderstanding something, but it looks like this
one should come before patch 6, where you remove
some of the dmabounce functions. Can you clarify?

Arnd
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


RE: [PATCHv8 07/10] ARM: dma-mapping: move all dma bounce code to separate dma ops structure

2012-04-10 Thread Marek Szyprowski
Hi Arnd,

On Tuesday, April 10, 2012 2:24 PM Arnd Bergmann wrote:

 On Tuesday 10 April 2012, Marek Szyprowski wrote:
  This patch removes dma bounce hooks from the common dma mapping
  implementation on ARM architecture and creates a separate set of
  dma_map_ops for dma bounce devices.
 
  Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
  Acked-by: Kyungmin Park kyungmin.p...@samsung.com
 
 I could be misunderstanding something, but it looks like this
 one should come before patch 6, where you remove
 some of the dmabounce functions. Can you clarify?

Before patch no 6, there were custom methods for all scatter/gather
related operations. They iterated over the whole scatter list and called
cache related operations directly (which in turn checked if we use dma
bounce code or not and called respective version). Patch no 6 changed
them not to use such shortcut for direct calling cache related operations.

Instead it provides similar loop over scatter list and calls methods
from the current device's dma_map_ops structure. This way, after patch no 
7 these functions call simple dma_map_page() method for all standard 
devices and dma bounce aware version for devices registered for dma 
bouncing (with use different dma_map_ops).

I can provide a separate set of scatter/gather list related functions for
the linear dma mapping implementation and dma bouncing implementation 
if you think that the current approach is too complicated or 
over-engineered.

Best regards
-- 
Marek Szyprowski
Samsung Poland RD Center


___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


RE: [PATCHv8 10/10] ARM: dma-mapping: add support for IOMMU mapper

2012-04-10 Thread Marek Szyprowski
Hi Arnd,

On Tuesday, April 10, 2012 1:58 PM Arnd Bergmann wrote:

 On Tuesday 10 April 2012, Marek Szyprowski wrote:
  +/**
  + * arm_iommu_create_mapping
  + * @bus: pointer to the bus holding the client device (for IOMMU calls)
  + * @base: start address of the valid IO address space
  + * @size: size of the valid IO address space
  + * @order: accuracy of the IO addresses allocations
  + *
  + * Creates a mapping structure which holds information about used/unused
  + * IO address ranges, which is required to perform memory allocation and
  + * mapping with IOMMU aware functions.
  + *
  + * The client device need to be attached to the mapping with
  + * arm_iommu_attach_device function.
  + */
  +struct dma_iommu_mapping *
  +arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t 
  size,
  +int order)
  +{
  +   unsigned int count = size  (PAGE_SHIFT + order);
  +   unsigned int bitmap_size = BITS_TO_LONGS(count) * sizeof(long);
  +   struct dma_iommu_mapping *mapping;
  +   int err = -ENOMEM;
  +
  +   if (!count)
  +   return ERR_PTR(-EINVAL);
  +
  +   mapping = kzalloc(sizeof(struct dma_iommu_mapping), GFP_KERNEL);
  +   if (!mapping)
  +   goto err;
  +
  +   mapping-bitmap = kzalloc(bitmap_size, GFP_KERNEL);
  +   if (!mapping-bitmap)
  +   goto err2;
  +
  +   mapping-base = base;
  +   mapping-bits = BITS_PER_BYTE * bitmap_size;
  +   mapping-order = order;
  +   spin_lock_init(mapping-lock);
  +
  +   mapping-domain = iommu_domain_alloc(bus);
  +   if (!mapping-domain)
  +   goto err3;
  +
  +   kref_init(mapping-kref);
  +   return mapping;
  +err3:
  +   kfree(mapping-bitmap);
  +err2:
  +   kfree(mapping);
  +err:
  +   return ERR_PTR(err);
  +}
  +EXPORT_SYMBOL(arm_iommu_create_mapping);
 
 I don't understand this function, mostly I guess because you have not
 provided any users. A few questions here:
 
 * What is ARM specific about it that it is named arm_iommu_create_mapping?
   Isn't this completely generic, at least on the interface side?
 
 * Why is this exported to modules? Which device drivers do you expect
   to call it?
 
 * Why do you pass the bus_type in here? That seems like the completely
   wrong thing to do when all devices are on the same bus type (e.g.
   amba or platform) but are connected to different instances that each
   have their own iommu. I guess this is a question for Jörg, because the
   base iommu interface provides iommu_domain_alloc().

I will soon post a patch which shows how my IOMMU aware dma-mapping 
integrates with Samsung Exynos4 SYSMMU driver, so I will be able to answer
all your questions by pointing to the respective lines in either IOMMU
framework or my integration code.

Best regards
-- 
Marek Szyprowski
Samsung Poland RD Center


___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH 00/10] vt-d irq_remap_ops patchset

2012-04-10 Thread Joerg Roedel
Hi,

On Fri, Mar 30, 2012 at 11:46:58AM -0700, Suresh Siddha wrote:
 Ingo,
 
 Here is the Joerg's irq_remap_ops patchset updated for the latest -tip.
 Simplified some of the naming conventions to follow the irq_remapping
 terminology. There are still some if (irq_remapping_enabled) checks in
 io_apic.c that I would like to roll into the new io_apic_ops. I will
 look into that shortly.
 
 Joerg Roedel (8):
   iommu: Rename intr_remapping files to intel_intr_remapping
   iommu/vt-d: Make intr-remapping initialization generic
   iommu/vt-d: Convert missing apic.c intr-remapping call to remap_ops
   iommu/vt-d: Convert IR ioapic-setup to use remap_ops
   iommu/vt-d: Convert IR set_affinity function to remap_ops
   iommu/vt-d: Convert free_irte into a remap_ops callback
   iommu/vt-d: Convert MSI remapping setup to remap_ops
   x86, iommu/vt-d: Clean up interfaces for interrupt remapping
 
 Suresh Siddha (2):
   iommu: rename intr_remapping references to irq_remapping
   iommu: rename intr_remapping.[ch] to irq_remapping.[ch]

Suresh, Yinghai, many thanks for testing this and pushing it forward. I
really appreciate it.

Ingo, Have these patches been applied to -tip or are there further
problems to be solved?


Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v12 2/3] ARM: EXYNOS: Change System MMU platform device definitions

2012-04-10 Thread Kukjin Kim

Joerg Roedel wrote:

On Fri, Mar 16, 2012 at 01:47:50PM -0700, Kukjin Kim wrote:

Anyway Joerg, how do you want to handle this? Do you want to pick up
1/2/3 all of them in your tree? If so, 2nd patch should be on top of
some samsung topic stuff.


Since patch 2 only applies to the Samsung tree, it is best to carry
this in your tree for merging. Feel free to add my Acked-by to patch 3.
But any further patches for the Exynos IOMMU drivers should go through
my tree after it is merged.


Hi Joerg,

I applied 1st and 2nd patches in my tree.

git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git 
next/cleanup-samsung-iommu


and my -next.

So please go ahead for 3rd patch in your tree. Note that if you need 1st 
and 2nd patches for your tree, please merge the 
'next/cleanup-samsung-iommu' branch in my tree. If not, will happen 
useless conflicts.


If any problems, please let me know.
Thanks.

Best regards,
Kgene.
--
Kukjin Kim kgene@samsung.com, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [RFC PATCH 0/3] IOMMU groups

2012-04-10 Thread Alex Williamson

Ping.  Does this approach look like it could satisfy your desire for a
more integrated group layer?  I'd really like to move VFIO forward,
we've been stalled on this long enough.  David Woodhouse, I think this
provides the quirking you're looking for for device like the Ricoh, do
you have any other requirements for a group layer?  Thanks,

Alex

On Mon, 2012-04-02 at 15:14 -0600, Alex Williamson wrote:
 This series attempts to make IOMMU device grouping a slightly more
 integral part of the device model.  iommu_device_groups were originally
 introduced to support the VFIO user space driver interface which needs
 to understand the granularity of device isolation in order to ensure
 security of devices when assigned for user access.  This information
 was provided via a simple group identifier from the IOMMU driver allowing
 VFIO to walk devices and assemble groups itself.
 
 The feedback received from this was that groups should be the effective
 unit of work for the IOMMU API.  The existing model of allowing domains
 to be created and individual devices attached ignores many of the
 restrictions of the IOMMU, whether by design, by topology or by defective
 devices.  Additionally we should be able to use the grouping information
 at the dma ops layer for managing domains and quirking devices.
 
 This series is a sketch at implementing only those aspects and leaving
 everything else about the multifaceted hairball of Isolation groups for
 another API.  Please comment and let me know if this seems like the
 direction we should be headed.  Thanks,
 
 Alex
 
 
 ---
 
 Alex Williamson (3):
   iommu: Create attach/detach group interface
   iommu: Create basic group infrastructure and update AMD-Vi  Intel VT-d
   iommu: Introduce iommu_group
 
 
  drivers/iommu/amd_iommu.c   |   50 ++
  drivers/iommu/intel-iommu.c |   76 
  drivers/iommu/iommu.c   |  210 
 ++-
  include/linux/device.h  |2 
  include/linux/iommu.h   |   43 +
  5 files changed, 301 insertions(+), 80 deletions(-)



___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu