Add support of the IOMMU_DEVICE flag.
This flag is used for specifying access to device memory. SMMU would apply device memory attributes for a DMA transaction. This is required for setting access to GIC registers, for generating message interrupts. This would ensure that transactions targetting device memory are not gathered or reordered. CRs-Fixed: 792402 Change-Id: Ief623e16e4f2dfc99ef6745459777269f1ab7ac6 Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> Patch-mainline: iommu @ 10/06/14 @ 10:28 Signed-off-by: Neeti Desai <neetid@codeaurora.org>
This commit is contained in:
parent
aa92e1c073
commit
e8ecda16e0
1 changed files with 7 additions and 0 deletions
|
@ -1690,6 +1690,10 @@ static int arm_smmu_alloc_init_pte(struct arm_smmu_domain *smmu_domain,
|
|||
if (prot & IOMMU_CACHE)
|
||||
pteval |= (MAIR_ATTR_IDX_CACHE <<
|
||||
ARM_SMMU_PTE_ATTRINDX_SHIFT);
|
||||
|
||||
if (prot & IOMMU_DEVICE)
|
||||
pteval |= (MAIR_ATTR_IDX_DEV <<
|
||||
ARM_SMMU_PTE_ATTRINDX_SHIFT);
|
||||
} else {
|
||||
pteval |= ARM_SMMU_PTE_HAP_FAULT;
|
||||
if (prot & IOMMU_READ && !(prot & IOMMU_PRIV))
|
||||
|
@ -1700,6 +1704,9 @@ static int arm_smmu_alloc_init_pte(struct arm_smmu_domain *smmu_domain,
|
|||
pteval |= ARM_SMMU_PTE_MEMATTR_OIWB;
|
||||
else
|
||||
pteval |= ARM_SMMU_PTE_MEMATTR_NC;
|
||||
|
||||
if (prot & IOMMU_DEVICE)
|
||||
pteval |= ARM_SMMU_PTE_MEMATTR_DEV;
|
||||
}
|
||||
|
||||
/* If no access, create a faulting entry to avoid TLB fills */
|
||||
|
|
Loading…
Add table
Reference in a new issue