diff options
| author | Robin Murphy <Robin.Murphy@arm.com> | 2015-03-04 16:41:05 +0000 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:14:51 -0700 |
| commit | 922d32b8b4fc9b53e40213fcd6bc5f80fee8d73b (patch) | |
| tree | 3b1d8085e7bb7bf9bcf507a3e9b7b08a8af8528e | |
| parent | ab1900e31088ad5a62199b6abd797aa9e9f79971 (diff) | |
iommu/arm-smmu: set a more appropriate DMA mask
Since we use dma_map_page() as an architecture-independent means of
making page table updates visible to non-coherent SMMUs, we need to
have a suitable DMA mask set to discourage the DMA mapping layer from
creating bounce buffers and flushing those instead, if said page tables
happen to lie outside the default 32-bit mask.
Change-Id: Ia97122cef853cb48c9ad45a2a35717dd85cd9764
Tested-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[will: added error checking]
Signed-off-by: Will Deacon <will.deacon@arm.com>
[pdaly@codeaurora.org Take upstream version]
| -rw-r--r-- | drivers/iommu/arm-smmu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 06534df46475..8288bb2f6fb9 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -3241,7 +3241,9 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu) * descriptor format is in use, but since a) we don't know that yet, * and b) it can vary per context bank, this will have to do... */ - dma_set_mask_and_coherent(smmu->dev, DMA_BIT_MASK(size)); + if (dma_set_mask_and_coherent(smmu->dev, DMA_BIT_MASK(size))) + dev_warn(smmu->dev, + "failed to set DMA mask for table walker\n"); if (smmu->version == ARM_SMMU_V1) { smmu->va_size = smmu->ipa_size; |
