mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
pci: Export pci_for_each_device_under_bus*()
They're actually more commonly used than the helper without _under_bus, because most callers do have the pci bus on hand. After exporting we can switch a lot of the call sites to use these two helpers. Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20211028043129.38871-3-peterx@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
b3dcf94f77
commit
2914fc61d5
9 changed files with 27 additions and 29 deletions
|
@ -2134,8 +2134,7 @@ dmar_host_bridges(Object *obj, void *opaque)
|
|||
PCIBus *bus = PCI_HOST_BRIDGE(obj)->bus;
|
||||
|
||||
if (bus && !pci_bus_bypass_iommu(bus)) {
|
||||
pci_for_each_device(bus, pci_bus_num(bus), insert_scope,
|
||||
scope_blob);
|
||||
pci_for_each_device_under_bus(bus, insert_scope, scope_blob);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2341,7 +2340,7 @@ ivrs_host_bridges(Object *obj, void *opaque)
|
|||
PCIBus *bus = PCI_HOST_BRIDGE(obj)->bus;
|
||||
|
||||
if (bus && !pci_bus_bypass_iommu(bus)) {
|
||||
pci_for_each_device(bus, pci_bus_num(bus), insert_ivhd, ivhd_blob);
|
||||
pci_for_each_device_under_bus(bus, insert_ivhd, ivhd_blob);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue