diff options
author | Hiroshi Doyu <hdoyu@nvidia.com> | 2013-04-08 08:37:21 +0300 |
---|---|---|
committer | Harshada Kale <hkale@nvidia.com> | 2013-06-10 03:49:39 -0700 |
commit | ef62680137e579922681cea1b9599e3e3f3b7c59 (patch) | |
tree | 20ffb8b835da7f1abf14a76e94c8a5aacd3e723f /drivers/iommu | |
parent | 845bbb0a9c42db6938ff785dc503ac6509f7e9fb (diff) |
iommu/tegra: smmu: Rename SMMU_ADDR_TO_PFN to SMMU_ADDR_TO_PTN
It will convert an address to a Page Table index Number. This is
equivalent to SMMU_ADDR_TO_PDN(), which converts an address to a Page
Directory index Number. So it's better to use PTN instead of PFN,
which may imply Page Frame Number wrongly.
bug 1286500
Change-Id: Ib2e02b91c5af91df5d374064e10266341adb402b
(cherry picked from commit 36448e5261403c54c6c30ddc41db9040f88bd1e7)
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/234126
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/tegra-smmu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index dac4c375b20e..e593ee9bf13a 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c @@ -156,7 +156,7 @@ enum { #define SMMU_PTE_SHIFT 12 #define SMMU_PFN_MASK 0x000fffff -#define SMMU_ADDR_TO_PFN(addr) (((addr) >> 12) & (BIT(10) - 1)) +#define SMMU_ADDR_TO_PTN(addr) (((addr) >> 12) & (BIT(10) - 1)) #define SMMU_ADDR_TO_PDN(addr) ((addr) >> 22) #define SMMU_PDN_TO_ADDR(pdn) ((pdn) << 22) @@ -583,7 +583,7 @@ static unsigned long *locate_pte(struct smmu_as *as, struct page **ptbl_page_p, unsigned int **count) { - unsigned long ptn = SMMU_ADDR_TO_PFN(iova); + unsigned long ptn = SMMU_ADDR_TO_PTN(iova); unsigned long pdn = SMMU_ADDR_TO_PDN(iova); unsigned long *pdir = page_address(as->pdir_page); unsigned long *ptbl; @@ -699,7 +699,7 @@ static size_t __smmu_iommu_unmap_pages(struct smmu_as *as, dma_addr_t iova, unsigned long *pdir = page_address(as->pdir_page); while (total > 0) { - unsigned long ptn = SMMU_ADDR_TO_PFN(iova); + unsigned long ptn = SMMU_ADDR_TO_PTN(iova); unsigned long pdn = SMMU_ADDR_TO_PDN(iova); struct page *page = SMMU_EX_PTBL_PAGE(pdir[pdn]); unsigned long *ptbl; |