projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82fa58e
)
iommu/tegra-smmu: Fix iova->phys translation
author
Nicolin Chen
<nicoleotsuka@gmail.com>
Fri, 11 Sep 2020 07:16:42 +0000
(
00:16
-0700)
committer
Joerg Roedel
<jroedel@suse.de>
Thu, 24 Sep 2020 10:32:31 +0000
(12:32 +0200)
IOVA might not be always 4KB aligned. So tegra_smmu_iova_to_phys
function needs to add on the lower 12-bit offset from input iova.
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link:
https://lore.kernel.org/r/20200911071643.17212-3-nicoleotsuka@gmail.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/tegra-smmu.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/tegra-smmu.c
b/drivers/iommu/tegra-smmu.c
index bd473e085aac90078526dc0c51586314f94c1973..e6d1424589506ac270d703b7b0e89a5ac026f6c5 100644
(file)
--- a/
drivers/iommu/tegra-smmu.c
+++ b/
drivers/iommu/tegra-smmu.c
@@
-795,7
+795,7
@@
static phys_addr_t tegra_smmu_iova_to_phys(struct iommu_domain *domain,
pfn = *pte & as->smmu->pfn_mask;
- return SMMU_PFN_PHYS(pfn);
+ return SMMU_PFN_PHYS(pfn)
+ SMMU_OFFSET_IN_PAGE(iova)
;
}
static struct tegra_smmu *tegra_smmu_find(struct device_node *np)