summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorHiroshi Doyu <hdoyu@nvidia.com>2013-09-11 14:43:59 +0300
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-16 17:42:20 -0700
commit01650df9eec73d65750ab9074eb26f0a7f2a195e (patch)
tree54e1915513ca625c8f7ee94d48bd2556b129034c /drivers/iommu
parentf46788a6f7d9d3999fdb0f7a2da63d19f3281907 (diff)
iommu/tegra: smmu: Remove page validataion
This page is returned from alloc_ptbl() and it's ensured that page is valid at this point. This code is inside of loop for map_sg/map_pages so that this affects the perf. Bug 1290869 Change-Id: I2b2165851a320496d650d6335127168f02882bed Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> Reviewed-on: http://git-master/r/273151 Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/tegra-smmu.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 3172293cc55a..341f2b47a6ac 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -1161,9 +1161,6 @@ static int smmu_iommu_map_pages(struct iommu_domain *domain, unsigned long iova,
tbl_page = SMMU_EX_PTBL_PAGE(pdir[pdn]);
}
- if (WARN_ON(!pfn_valid(page_to_pfn(tbl_page))))
- goto skip;
-
ptbl = page_address(tbl_page);
for (i = 0; i < count; i++) {
pte = &ptbl[ptn + i];
@@ -1179,7 +1176,7 @@ static int smmu_iommu_map_pages(struct iommu_domain *domain, unsigned long iova,
if (!flush_all)
flush_ptc_and_tlb_range(smmu, as, iova, pte, tbl_page,
count);
-skip:
+
iova += PAGE_SIZE * count;
total -= count;
pages += count;
@@ -1238,9 +1235,6 @@ static int smmu_iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
tbl_page = SMMU_EX_PTBL_PAGE(pdir[pdn]);
}
- if (WARN_ON(!pfn_valid(page_to_pfn(tbl_page))))
- goto skip;
-
ptbl = page_address(tbl_page);
for (i = 0; i < count; i++) {
@@ -1264,7 +1258,7 @@ static int smmu_iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
if (!flush_all)
flush_ptc_and_tlb_range(smmu, as, iova, pte, tbl_page,
count);
-skip:
+
iova += PAGE_SIZE * count;
total -= count;