Hi,
The following APIs are needed for us to support the legacy Tegra
memory manager for devices(NvMap) with *DMA mapping API*.
New API:
-iova_alloc(): To allocate IOVA area.
-iova_alloc_at(): To allocate IOVA area at specific address.
-iova_free(): To free IOVA area.
-map_page_at(): To
-iova_get_free_total() returns the sum of available free areas.
-iova_get_free_max() returns the largest available free area size.
Signed-off-by: Hiroshi Doyu hd...@nvidia.com
---
arch/arm/include/asm/dma-mapping.h | 16 ++
arch/arm/mm/dma-mapping.c | 54
There are some cases that IOVA allocation and mapping have to be done
seperately, especially for perf optimization reasons. This patch
allows client modules to {alloc,free} IOVA space without backing up
actual pages for that area.
Signed-off-by: Hiroshi Doyu hd...@nvidia.com
---
Introduce a helper function, dma_map_linear(_attrs)() to create IOVA
linear map, where IOVA and kernel virtual addresses are mapped at the
same address linearly. This is useful to support legacy device drivers
which expects no IOMMU.
Signed-off-by: Hiroshi Doyu hd...@nvidia.com
---
To allocate IOVA area at specified address
Signed-off-by: Hiroshi Doyu hd...@nvidia.com
---
arch/arm/include/asm/dma-mapping.h |9 +
arch/arm/mm/dma-mapping.c | 35 +++
include/linux/dma-mapping.h|2 ++
3 files changed, 46
Signed-off-by: Hiroshi Doyu hd...@nvidia.com
---
arch/arm/mm/dma-mapping.c| 18 ++
include/asm-generic/dma-mapping-common.h | 19 +++
include/linux/dma-mapping.h |7 +++
3 files changed, 44 insertions(+), 0 deletions(-)