Lines Matching refs:bus

82 static struct iommu_domain *iommu_domain_alloc_ext(struct bus_type *bus, unsigned type);

191 const struct iommu_ops *ops = dev->bus->iommu_ops;
246 const struct iommu_ops *ops = dev->bus->iommu_ops;
295 const struct iommu_ops *ops = dev->bus->iommu_ops;
1308 if (tmp == pdev || tmp->bus != pdev->bus || PCI_SLOT(tmp->devfn) != PCI_SLOT(pdev->devfn) ||
1325 * aliases are only supported on the same bus, therefore the search
1348 if (tmp == pdev || tmp->bus != pdev->bus) {
1401 * Use standard PCI bus topology, isolation features, and DMA alias quirks
1408 struct pci_bus *bus;
1434 for (bus = pdev->bus; !pci_is_root_bus(bus); bus = bus->parent) {
1435 if (!bus->self) {
1439 if (pci_acs_path_enabled(bus->self, NULL, REQ_ACS_FLAGS)) {
1443 pdev = bus->self;
1475 /* Get the IOMMU group for device on fsl-mc bus */
1491 const struct iommu_ops *ops = dev->bus->iommu_ops;
1501 static int iommu_group_alloc_default_domain(struct bus_type *bus, struct iommu_group *group, unsigned int type)
1505 dom = iommu_domain_alloc_ext(bus, type);
1507 dom = iommu_domain_alloc_ext(bus, IOMMU_DOMAIN_DMA);
1542 return iommu_group_alloc_default_domain(dev->bus, group, type);
1550 * support common, bus-defined algorithms when determining or creating the
1557 const struct iommu_ops *ops = dev->bus->iommu_ops;
1686 const struct iommu_ops *ops = dev->bus->iommu_ops;
1712 static void probe_alloc_default_domain(struct bus_type *bus, struct iommu_group *group)
1725 iommu_group_alloc_default_domain(bus, group, gtype.type);
1775 int bus_iommu_probe(struct bus_type *bus)
1786 ret = bus_for_each_dev(bus, NULL, &group_list, probe_iommu_group);
1799 probe_alloc_default_domain(bus, group);
1822 static int iommu_bus_init(struct bus_type *bus, const struct iommu_ops *ops)
1834 err = bus_register_notifier(bus, nb);
1839 err = bus_iommu_probe(bus);
1848 bus_for_each_dev(bus, NULL, NULL, remove_iommu_group);
1849 bus_unregister_notifier(bus, nb);
1858 * bus_set_iommu - set iommu-callbacks for the bus
1859 * @bus: bus.
1863 * used for a particular bus. Drivers for devices on that bus can use
1866 * the bus itself, so the iommu drivers are not initialized when the bus
1870 int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops)
1875 bus->iommu_ops = NULL;
1879 if (bus->iommu_ops != NULL) {
1883 bus->iommu_ops = ops;
1885 /* Do IOMMU specific setup for this bus-type */
1886 err = iommu_bus_init(bus, ops);
1888 bus->iommu_ops = NULL;
1895 bool iommu_present(struct bus_type *bus)
1897 return bus->iommu_ops != NULL;
1901 bool iommu_capable(struct bus_type *bus, enum iommu_cap cap)
1903 if (!bus->iommu_ops || !bus->iommu_ops->capable) {
1907 return bus->iommu_ops->capable(cap);
1932 static struct iommu_domain *iommu_domain_alloc_ext(struct bus_type *bus, unsigned type)
1936 if (bus == NULL || bus->iommu_ops == NULL) {
1940 domain = bus->iommu_ops->domain_alloc(type);
1945 domain->ops = bus->iommu_ops;
1948 domain->pgsize_bitmap = bus->iommu_ops->pgsize_bitmap;
1953 struct iommu_domain *iommu_domain_alloc(struct bus_type *bus)
1955 return iommu_domain_alloc_ext(bus, IOMMU_DOMAIN_UNMANAGED);
2832 const struct iommu_ops *ops = dev->bus->iommu_ops;
2841 const struct iommu_ops *ops = dev->bus->iommu_ops;
2996 const struct iommu_ops *ops = dev->bus->iommu_ops;
3119 const struct iommu_ops *ops = dev->bus->iommu_ops;
3167 const struct iommu_ops *ops = dev->bus->iommu_ops;
3188 const struct iommu_ops *ops = handle->dev->bus->iommu_ops;