pci/pcie_port: Add pci_find_port_by_pn()
commitaa970ed586f9c7f178b813bda2919e329b841e3c
authorJonathan Cameron <jonathan.cameron@huawei.com>
Fri, 29 Apr 2022 14:40:55 +0000 (29 15:40 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 13 May 2022 11:57:26 +0000 (13 07:57 -0400)
treea13dac626ff3e491b3a38c737a87ddfa82ba345f
parentfc1e01e009fd4b1e08399253591b32e01f10808f
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>
hw/pci/pcie_port.c
include/hw/pci/pcie_port.h