Lines Matching defs:ops

246  * @ops:   IOMMU ops to associate with the instance
252 const struct iommu_ops *ops, struct device *hwdev)
257 if (WARN_ON(is_module_address((unsigned long)ops) && !ops->owner))
264 if (iommu_buses[0]->iommu_ops && iommu_buses[0]->iommu_ops != ops)
267 iommu->ops = ops;
276 iommu_buses[i]->iommu_ops = ops;
312 const struct iommu_ops *ops, struct bus_type *bus,
317 iommu->ops = ops;
327 bus->iommu_ops = ops;
388 static int iommu_init_device(struct device *dev, const struct iommu_ops *ops)
397 if (!try_module_get(ops->owner)) {
402 iommu_dev = ops->probe_device(dev);
412 group = ops->device_group(dev);
423 if (ops->is_attach_deferred)
424 dev->iommu->attach_deferred = ops->is_attach_deferred(dev);
430 if (ops->release_device)
431 ops->release_device(dev);
433 module_put(ops->owner);
442 const struct iommu_ops *ops = dev_iommu_ops(dev);
457 if (ops->release_device)
458 ops->release_device(dev);
478 module_put(ops->owner);
486 const struct iommu_ops *ops = dev->bus->iommu_ops;
491 if (!ops)
506 ret = iommu_init_device(dev, ops);
563 const struct iommu_ops *ops;
572 ops = dev_iommu_ops(dev);
573 if (ops->probe_finalize)
574 ops->probe_finalize(dev);
1451 const struct iommu_ops *ops = dev_iommu_ops(dev);
1454 if (!ops->page_response)
1495 ret = ops->page_response(dev, evt, msg);
1720 const struct iommu_ops *ops = dev_iommu_ops(dev);
1725 if (ops->def_domain_type)
1726 return ops->def_domain_type(dev);
1849 const struct iommu_ops *ops = dev_iommu_ops(dev);
1851 if (ops->probe_finalize)
1852 ops->probe_finalize(dev);
1886 * FIXME: Mis-locked because the ops->probe_finalize() call-back
1914 const struct iommu_ops *ops;
1919 ops = dev_iommu_ops(dev);
1920 if (!ops->capable)
1923 return ops->capable(dev, cap);
1994 if (!domain->ops)
1995 domain->ops = bus->iommu_ops->default_domain_ops;
2015 domain->ops->free(domain);
2040 if (unlikely(domain->ops->attach_dev == NULL))
2043 ret = domain->ops->attach_dev(domain, dev);
2285 const struct iommu_ops *ops = dev_iommu_ops(gdev->dev);
2287 if (!WARN_ON(!ops->set_platform_dma_ops))
2288 ops->set_platform_dma_ops(gdev->dev);
2328 const struct iommu_ops *ops = dev_iommu_ops(gdev->dev);
2339 else if (ops->set_platform_dma_ops)
2340 ops->set_platform_dma_ops(gdev->dev);
2363 return domain->ops->iova_to_phys(domain, iova);
2425 const struct iommu_domain_ops *ops = domain->ops;
2434 if (ops->map_pages) {
2435 ret = ops->map_pages(domain, iova, paddr, pgsize, count, prot,
2438 ret = ops->map(domain, iova, paddr, pgsize, prot, gfp);
2448 const struct iommu_domain_ops *ops = domain->ops;
2455 if (unlikely(!(ops->map || ops->map_pages) ||
2508 const struct iommu_domain_ops *ops = domain->ops;
2519 if (ret == 0 && ops->iotlb_sync_map)
2520 ops->iotlb_sync_map(domain, iova, size);
2530 const struct iommu_domain_ops *ops = domain->ops;
2534 return ops->unmap_pages ?
2535 ops->unmap_pages(domain, iova, pgsize, count, iotlb_gather) :
2536 ops->unmap(domain, iova, pgsize, iotlb_gather);
2543 const struct iommu_domain_ops *ops = domain->ops;
2548 if (unlikely(!(ops->unmap || ops->unmap_pages) ||
2619 const struct iommu_domain_ops *ops = domain->ops;
2661 if (ops->iotlb_sync_map)
2662 ops->iotlb_sync_map(domain, iova, mapped);
2731 if (!domain->ops->enable_nesting)
2733 return domain->ops->enable_nesting(domain);
2742 if (!domain->ops->set_pgtable_quirks)
2744 return domain->ops->set_pgtable_quirks(domain, quirk);
2758 const struct iommu_ops *ops = dev_iommu_ops(dev);
2760 if (ops->get_resv_regions)
2761 ops->get_resv_regions(dev, list);
2827 const struct iommu_ops *ops = NULL;
2833 ops = iommu->ops;
2837 return ops;
2841 const struct iommu_ops *ops)
2846 return ops == fwspec->ops ? 0 : -EINVAL;
2858 fwspec->ops = ops;
2908 const struct iommu_ops *ops = dev->iommu->iommu_dev->ops;
2910 if (ops->dev_enable_feat)
2911 return ops->dev_enable_feat(dev, feat);
2924 const struct iommu_ops *ops = dev->iommu->iommu_dev->ops;
2926 if (ops->dev_disable_feat)
2927 return ops->dev_disable_feat(dev, feat);
3000 * iommu driver and call ops->release_device. Put the domain
3100 * Release the mutex here because ops->probe_finalize() call-back of
3376 ret = domain->ops->set_dev_pasid(domain, device->dev, pasid);
3388 const struct iommu_ops *ops;
3391 ops = dev_iommu_ops(device->dev);
3392 ops->remove_dev_pasid(device->dev, pasid);
3411 if (!domain->ops->set_dev_pasid)
3500 const struct iommu_ops *ops = dev_iommu_ops(dev);
3503 domain = ops->domain_alloc(IOMMU_DOMAIN_SVA);