iommu/arm-smmu: correct the physical address mask during ATOS
We're currently taking the upper 52 bits from the CB_PAR register and using them for the output physical address. That doesn't make sense for a few reasons, not the least of which is the fact that physical addresses are only 48 bits on ARM64 and even less on ARM32. Also, when using V7L and V8 descriptor formats the top byte of the CB_PAR register contains the memory attributes for the translation. Fix this by masking out everything above the valid physical address bits with PHYS_MASK. Change-Id: I96096a6515dc42025d3134933a90b072e5153968 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
This commit is contained in:
parent
30155bb55e
commit
e4348b5975
1 changed files with 1 additions and 1 deletions
|
@ -1858,7 +1858,7 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
|
||||||
dev_err(dev, "PAR = 0x%llx\n", phys);
|
dev_err(dev, "PAR = 0x%llx\n", phys);
|
||||||
phys = 0;
|
phys = 0;
|
||||||
} else {
|
} else {
|
||||||
phys = (phys & 0xfffffff000ULL) | (iova & 0x00000fff);
|
phys = (phys & (PHYS_MASK & ~0xfffULL)) | (iova & 0xfff);
|
||||||
}
|
}
|
||||||
|
|
||||||
arm_smmu_disable_clocks(smmu);
|
arm_smmu_disable_clocks(smmu);
|
||||||
|
|
Loading…
Add table
Reference in a new issue