Commit graph

6 commits

Author SHA1 Message Date
Patrick Daly
c412cb15e0 iommu: Fix compilation error without CONFIG_IOMMU_API
Add an "inline" so the compiler no longer gives a defined-but-not-used
warning.

Change-Id: I226242bf994e659d8018a885f20c3a3f80b9b8e5
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-09-19 18:51:02 -07:00
Liam Mark
05f15e3f74 iommu: msm: ensure lazy mappings are unmapped on detach
Ensure that on detach any lazy mappings for that device are released.

We don't want to leave any outstanding mappings after detach because
the client expects all mappings to have been unmapped, also we don't
want to leave references, in the lazy mapping framework, to devices
which could cease to exists.

CRs-Fixed: 1053605
Change-Id: I9894257c4783073fdba734a175bac486d6ee9347
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2016-08-17 13:17:16 -07:00
Shiraz Hashim
d880efb021 dma-mapping: fix build when !CONFIG_ARM_DMA_USE_IOMMU
Allow compilation when CONFIG_ARM_DMA_USE_IOMMU is not
selected by providing necessary stub functions and fix few
mismatch in function declarations.

Following this, remove the changes introduced by
f3d8d1061fb0b146b3f5 ("msm: ipa: add empty implementation
for iommu functions") as they are no longer needed.

Change-Id: I04e3aa63407064e8d9c9550a5cb0a82ede899f00
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
2016-03-22 11:14:34 -07:00
Rohit Vaswani
2a9e5873f3 iommu: msm: Allow passing dma_attrs for lazy mapping
The msm lazy mapping APIs did not allow to pass in
dma attributes that could be passed to the dma-mapping
driver. This patch allows users to specify dma attributes for the
msm lazy mappings.

Change-Id: I3e4cd2bb99d205dce78083a256f4d444d865f3cc
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2016-03-22 11:13:18 -07:00
Abhimanyu Kapur
8d4ded3f02 iommu: msm: surround the msm_dma_iommu apis with iommu ifdef
Make all msm_dma_iommu apis depend on CONFIG_IOMMU_API as it is
only used when we have the linux iommu layer available.

Change-Id: I879dc1a9174d498b9b4bc68b2418165f3b2675a3
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:13:09 -07:00
Olav Haugan
87e6f73b29 iommu: Add support for delayed unmapping of ion/dma_buf buffer
Add new APIs to allow clients to map and unmap dma_buffers created by
ION. The call to the unmap API will not actually do the unmapping from the
IOMMU. The unmapping will occur when the ION/dma_buf buffer is actually
freed. This behavior can be disabled with DMA_ATTR_NO_DELAYED_UNMAP

Change-Id: Ic4dbd3b582eb0388020c650cab5fbb1dad67ae81
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-03-22 11:04:34 -07:00