Loading arch/arm/mm/dma-mapping.c +8 −2 Original line number Diff line number Diff line Loading @@ -2332,11 +2332,15 @@ int arm_iommu_attach_device(struct device *dev, struct dma_iommu_mapping *mapping) { int err; int s1_bypass = 0; err = __arm_iommu_attach_device(dev, mapping); if (err) return err; iommu_domain_get_attr(mapping->domain, DOMAIN_ATTR_S1_BYPASS, &s1_bypass); if (!s1_bypass) set_dma_ops(dev, &iommu_ops); return 0; } Loading @@ -2352,6 +2356,7 @@ EXPORT_SYMBOL_GPL(arm_iommu_attach_device); void arm_iommu_detach_device(struct device *dev) { struct dma_iommu_mapping *mapping; int s1_bypass = 0; mapping = to_dma_iommu_mapping(dev); if (!mapping) { Loading @@ -2362,6 +2367,7 @@ void arm_iommu_detach_device(struct device *dev) iommu_detach_device(mapping->domain, dev); kref_put(&mapping->kref, release_iommu_mapping); to_dma_iommu_mapping(dev) = NULL; if (!s1_bypass) set_dma_ops(dev, NULL); pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev)); Loading Loading
arch/arm/mm/dma-mapping.c +8 −2 Original line number Diff line number Diff line Loading @@ -2332,11 +2332,15 @@ int arm_iommu_attach_device(struct device *dev, struct dma_iommu_mapping *mapping) { int err; int s1_bypass = 0; err = __arm_iommu_attach_device(dev, mapping); if (err) return err; iommu_domain_get_attr(mapping->domain, DOMAIN_ATTR_S1_BYPASS, &s1_bypass); if (!s1_bypass) set_dma_ops(dev, &iommu_ops); return 0; } Loading @@ -2352,6 +2356,7 @@ EXPORT_SYMBOL_GPL(arm_iommu_attach_device); void arm_iommu_detach_device(struct device *dev) { struct dma_iommu_mapping *mapping; int s1_bypass = 0; mapping = to_dma_iommu_mapping(dev); if (!mapping) { Loading @@ -2362,6 +2367,7 @@ void arm_iommu_detach_device(struct device *dev) iommu_detach_device(mapping->domain, dev); kref_put(&mapping->kref, release_iommu_mapping); to_dma_iommu_mapping(dev) = NULL; if (!s1_bypass) set_dma_ops(dev, NULL); pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev)); Loading