diff options
author | Hiroshi Doyu <hdoyu@nvidia.com> | 2013-08-21 07:58:26 +0300 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:42:03 -0700 |
commit | 6bfa2194ec38bd177dc109c78ea7cbf29924d375 (patch) | |
tree | 634f7cd18195ffa5bda1ca5922bbd0388a68ef55 /drivers/iommu | |
parent | e85d3b8051319e8ad1a3773270d5de66f4bb8814 (diff) |
iommu/tegra: smmu: Use dma_map_linear to reserve
Use dma_map_linear instead of iommu_map to reserve this area against
being overwritten by other clients.
Bug 1297607
Change-Id: Iaef0a9d819dc64623a19d3124466fc90842563af
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/264254
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/tegra-smmu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index a741661fb786..b686692d8572 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c @@ -1365,10 +1365,12 @@ static int smmu_iommu_attach_dev(struct iommu_domain *domain, map = temp; while (area && area->size) { + DEFINE_DMA_ATTRS(attrs); size_t size = PAGE_ALIGN(area->size); - err = iommu_map(domain, area->start, area->start, size, 0); - if (err) + dma_set_attr(DMA_ATTR_SKIP_CPU_SYNC, &attrs); + err = dma_map_linear_attrs(dev, area->start, size, 0, &attrs); + if (err == DMA_ERROR_CODE) dev_err(dev, "Failed to map %016llx(%x)\n", (u64)area->start, size); |