mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
pci/pcie_port: Add pci_find_port_by_pn()
Simple function to search a PCIBus to find a port by it's port number. CXL interleave decoding uses the port number as a target so it is necessary to locate the port when doing interleave decoding. Signed-off-by: Jonathan Cameron <jonathan.cameron@huawei.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220429144110.25167-31-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
fc1e01e009
commit
aa970ed586
2 changed files with 27 additions and 0 deletions
|
@ -39,6 +39,8 @@ struct PCIEPort {
|
|||
|
||||
void pcie_port_init_reg(PCIDevice *d);
|
||||
|
||||
PCIDevice *pcie_find_port_by_pn(PCIBus *bus, uint8_t pn);
|
||||
|
||||
#define TYPE_PCIE_SLOT "pcie-slot"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(PCIESlot, PCIE_SLOT)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue