]> git.baikalelectronics.ru Git - kernel.git/commit
arm: dma-mapping: Add support to extend DMA IOMMU mappings
authorAndreas Herrmann <andreas.herrmann@calxeda.com>
Tue, 25 Feb 2014 12:09:53 +0000 (13:09 +0100)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 28 Feb 2014 10:55:18 +0000 (11:55 +0100)
commit77142a29dad9bec93cbdf9b18772cd9c0b2d8e0f
treecbaa9c31df099c84e78a7d4a8139ca2b9ccf7a27
parentc12b88ed84c80e42e377bda8d1cbf68924238ae1
arm: dma-mapping: Add support to extend DMA IOMMU mappings

Instead of using just one bitmap to keep track of IO virtual addresses
(handed out for IOMMU use) introduce an array of bitmaps. This allows
us to extend existing mappings when running out of iova space in the
initial mapping etc.

If there is not enough space in the mapping to service an IO virtual
address allocation request, __alloc_iova() tries to extend the mapping
-- by allocating another bitmap -- and makes another allocation
attempt using the freshly allocated bitmap.

This allows arm iommu drivers to start with a decent initial size when
an dma_iommu_mapping is created and still to avoid running out of IO
virtual addresses for the mapping.

Signed-off-by: Andreas Herrmann <andreas.herrmann@calxeda.com>
[mszyprow: removed extensions parameter to arm_iommu_create_mapping()
 function, which will be modified in the next patch anyway, also some
 debug messages about extending bitmap]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
arch/arm/include/asm/dma-iommu.h
arch/arm/mm/dma-mapping.c