summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLiam Mark <lmark@codeaurora.org>2016-08-11 16:17:17 -0700
committerLiam Mark <lmark@codeaurora.org>2016-08-17 13:17:16 -0700
commit05f15e3f74c903e874d227609821724e381f0aba (patch)
tree701289e0a6da90e59a95058f6f7c911315586190 /include/linux
parente94b446eac88a43e42ecde105275d48b677ea5b3 (diff)
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/msm_dma_iommu_mapping.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/msm_dma_iommu_mapping.h b/include/linux/msm_dma_iommu_mapping.h
index 370d6f5e1d65..76451faa2073 100644
--- a/include/linux/msm_dma_iommu_mapping.h
+++ b/include/linux/msm_dma_iommu_mapping.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -50,6 +50,7 @@ static inline int msm_dma_map_sg(struct device *dev, struct scatterlist *sg,
void msm_dma_unmap_sg(struct device *dev, struct scatterlist *sgl, int nents,
enum dma_data_direction dir, struct dma_buf *dma_buf);
+int msm_dma_unmap_all_for_dev(struct device *dev);
/*
* Below is private function only to be called by framework (ION) and not by
@@ -89,6 +90,11 @@ static inline void msm_dma_unmap_sg(struct device *dev,
{
}
+int msm_dma_unmap_all_for_dev(struct device *dev)
+{
+ return 0;
+}
+
static inline void msm_dma_buf_freed(void *buffer) {}
#endif /*CONFIG_IOMMU_API*/