summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorLaura Abbott <lauraa@codeaurora.org>2014-02-04 13:57:05 -0800
committerLaura Abbott <lauraa@codeaurora.org>2014-02-11 09:47:08 -0800
commitb86285d2573e5e0312884567352ead561451466d (patch)
treeb088ef763482c55d49dd0f0198c5c32a6d4dd73e /drivers/iommu
parent219364c550a437c70e7726505d1c5a1291aa98c8 (diff)
iommu: msm: Use standard caching APIs
There's no need to have cache wrappers anymore. Call the appropriate cache API directly. Change-Id: If31002ef8b3a6598700c2c59ca9a5cc19a188da6 Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/msm_iommu_sec.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/iommu/msm_iommu_sec.c b/drivers/iommu/msm_iommu_sec.c
index 0c4acaf04d44..d3be32deb9c4 100644
--- a/drivers/iommu/msm_iommu_sec.c
+++ b/drivers/iommu/msm_iommu_sec.c
@@ -28,6 +28,7 @@
#include <linux/kmemleak.h>
#include <soc/qcom/scm.h>
+#include <asm/cacheflush.h>
#include <asm/sizes.h>
#include <mach/iommu_perfmon.h>
@@ -137,8 +138,7 @@ static int msm_iommu_dump_fault_regs(int smmu_id, int cb_num,
ret = scm_call(SCM_SVC_UTIL, IOMMU_DUMP_SMMU_FAULT_REGS,
&req_info, sizeof(req_info), &resp, 1);
- invalidate_caches((unsigned long) regs, sizeof(*regs),
- (unsigned long)virt_to_phys(regs));
+ dmac_inv_range(regs, regs + sizeof(*regs));
return ret;
}
@@ -419,7 +419,7 @@ static int msm_iommu_sec_ptbl_map(struct msm_iommu_drvdata *iommu_drvdata,
/*
* Ensure that the buffer is in RAM by the time it gets to TZ
*/
- clean_caches((unsigned long) flush_va, len, flush_pa);
+ dmac_clean_range(flush_va, flush_va + len);
if (scm_call(SCM_SVC_MP, IOMMU_SECURE_MAP2, &map, sizeof(map), &ret,
sizeof(ret)))
@@ -428,7 +428,7 @@ static int msm_iommu_sec_ptbl_map(struct msm_iommu_drvdata *iommu_drvdata,
return -EINVAL;
/* Invalidate cache since TZ touched this address range */
- invalidate_caches((unsigned long) flush_va, len, flush_pa);
+ dmac_inv_range(flush_va, flush_va + len);
return 0;
}
@@ -506,9 +506,8 @@ static int msm_iommu_sec_ptbl_map_range(struct msm_iommu_drvdata *iommu_drvdata,
/*
* Ensure that the buffer is in RAM by the time it gets to TZ
*/
- clean_caches((unsigned long) flush_va,
- sizeof(unsigned long) * map.plist.list_size,
- virt_to_phys(flush_va));
+ dmac_clean_range(flush_va,
+ flush_va + sizeof(unsigned long) * map.plist.list_size);
ret = scm_call(SCM_SVC_MP, IOMMU_SECURE_MAP2, &map, sizeof(map),
&scm_ret, sizeof(scm_ret));