summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorHiroshi Doyu <hdoyu@nvidia.com>2013-09-11 14:02:24 +0300
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-16 17:42:18 -0700
commit6ba4ec8d617f68d294247e716e098aa42806eddd (patch)
tree367c5be87e907247a1b3c6d86ab422d3978d9ca3 /drivers/iommu
parenta56032dec36c34c0d3736df6358fc0a5e15d3e60 (diff)
iommu/tegra: smmu: Rename "nents" to "npages"
The parameter "nents" is confusing. Actually this is number of pages, "npages". Rename this for the following changes in map_sg(). Bug 1290869 Change-Id: If9ff6740e4f3954f9742d9fe4c4039ca601970e1 Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> Reviewed-on: http://git-master/r/273149 Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/tegra-smmu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index c44ad13be4f3..fca8606ccfc4 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -1195,13 +1195,13 @@ out:
}
static int smmu_iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
- struct scatterlist *sgl, int nents, int prot)
+ struct scatterlist *sgl, int npages, int prot)
{
unsigned int count;
struct scatterlist *s;
int err = 0;
unsigned long iova_base = iova;
- bool flush_all = (nents > smmu_flush_all_th_pages) ? true : false;
+ bool flush_all = (npages > smmu_flush_all_th_pages) ? true : false;
struct smmu_as *as = domain->priv;
struct smmu_device *smmu = as->smmu;
int attrs = as->pte_attr;
@@ -1211,7 +1211,7 @@ static int smmu_iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
else if (dma_get_attr(DMA_ATTR_WRITE_ONLY, (struct dma_attrs *)prot))
attrs &= ~_READABLE;
- for (count = 0, s = sgl; count < nents; s = sg_next(s)) {
+ for (count = 0, s = sgl; count < npages; s = sg_next(s)) {
phys_addr_t phys = page_to_phys(sg_page(s));
unsigned int len = PAGE_ALIGN(s->offset + s->length);
unsigned long flags;
@@ -1274,7 +1274,7 @@ skip:
if (flush_all)
flush_ptc_and_tlb_as(as, iova_base,
- iova_base + nents * PAGE_SIZE);
+ iova_base + npages * PAGE_SIZE);
return err;
}