Loading arch/arm/mm/dma-mapping.c +21 −9 Original line number Diff line number Diff line Loading @@ -2470,10 +2470,21 @@ static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size, const struct iommu_ops *iommu) { struct dma_iommu_mapping *mapping; struct iommu_domain *domain; if (!iommu) return false; /* * Adding this to not to attach to smmu device by default as any way * clients call the arm_iommu_create_mapping() in their use cases. */ domain = iommu_get_domain_for_dev(dev); if (!domain) return false; if (domain->type == IOMMU_DOMAIN_DMA) { mapping = arm_iommu_create_mapping(dev->bus, dma_base, size); if (IS_ERR(mapping)) { pr_warn("Failed to create %llu-byte IOMMU mapping for device %s\n", Loading @@ -2487,6 +2498,7 @@ static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size, arm_iommu_release_mapping(mapping); return false; } } return true; } Loading Loading
arch/arm/mm/dma-mapping.c +21 −9 Original line number Diff line number Diff line Loading @@ -2470,10 +2470,21 @@ static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size, const struct iommu_ops *iommu) { struct dma_iommu_mapping *mapping; struct iommu_domain *domain; if (!iommu) return false; /* * Adding this to not to attach to smmu device by default as any way * clients call the arm_iommu_create_mapping() in their use cases. */ domain = iommu_get_domain_for_dev(dev); if (!domain) return false; if (domain->type == IOMMU_DOMAIN_DMA) { mapping = arm_iommu_create_mapping(dev->bus, dma_base, size); if (IS_ERR(mapping)) { pr_warn("Failed to create %llu-byte IOMMU mapping for device %s\n", Loading @@ -2487,6 +2498,7 @@ static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size, arm_iommu_release_mapping(mapping); return false; } } return true; } Loading