aboutsummaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2015-09-24 19:32:23 +0100
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2015-09-24 19:32:23 +0100
commit4eb02142160bb2507dbf30f69112df4bb75e14ee (patch)
tree7f13430e0c709476b550575ad8aeb5ec0d71d59d /arch/arm
parent807cc48dc46a32bc329ddd0e4fbf717800477d6f (diff)
parentf70ad919621a054a8ff552e52a8ffcec60046d90 (diff)
Merge branch 'tracking-qcomlt-iommu' into integration-linux-qcomlt
* tracking-qcomlt-iommu: (24 commits) iommu/msm: Fix "scheduling while atomic" bug drm/msm: temp: Add a check to be compatible against both iommuv0/v1 iommu: of: Handle IOMMU lookup failure with deferred probing or error iommu: of: Document the of_iommu_configure() function drivers: platform: Configure dma operations at probe time of: dma: Split of_configure_dma() into mask and ops configuration of: dma: Make of_dma_deconfigure() public of: dma: Move range size workaround to of_dma_get_range() arm: dma-mapping: Don't override dma_ops in arch_setup_dma_ops() temp: Add dummy msm_iommu_get_ctx and fix broken build iommu/msm: Set cacheability attributes without tex remap iommu/msm: Add support for generic master bindings iommu/msm: Move the contents from msm_iommu_dev.c to msm_iommu.c iommu/msm: Add DT adaptation DOWNSTREAM: drm/msm: use downstream iommu qcom: iommu: Make use of domain_alloc and domain_free arm64: provide dma cache routines with same API as 32 bit iommu: msm: Invalidate properly from iommu_unmap iommu: qcom: v1: fix wrong sg interator iommu: qcom: v1: rework secure part and build ...
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mm/dma-mapping.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 1a7815e5421b..7e2b75f8b046 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -2126,6 +2126,15 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
struct dma_map_ops *dma_ops;
dev->archdata.dma_coherent = coherent;
+
+ /*
+ * Don't override the dma_ops if they have already been set. Ideally
+ * this should be the only location where dma_ops are set, remove this
+ * check when all other callers of set_dma_ops will have disappeared.
+ */
+ if (dev->archdata.dma_ops)
+ return;
+
if (arm_setup_iommu_dma_ops(dev, dma_base, size, iommu))
dma_ops = arm_get_iommu_dma_map_ops(coherent);
else