[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/65] hw/pci-host/gpex-acpi: Use acpi_uid property.
From: |
Michael S. Tsirkin |
Subject: |
[PULL 11/65] hw/pci-host/gpex-acpi: Use acpi_uid property. |
Date: |
Mon, 4 Nov 2024 16:06:11 -0500 |
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reduce the direct use of PCI internals inside ACPI table creation.
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: "Huang, Ying" <ying.huang@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240916171017.1841767-10-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/pci-host/gpex-acpi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/pci-host/gpex-acpi.c b/hw/pci-host/gpex-acpi.c
index 391fabb8a8..e8b4c64c5f 100644
--- a/hw/pci-host/gpex-acpi.c
+++ b/hw/pci-host/gpex-acpi.c
@@ -141,6 +141,7 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)
QLIST_FOREACH(bus, &bus->child, sibling) {
uint8_t bus_num = pci_bus_num(bus);
uint8_t numa_node = pci_bus_numa_node(bus);
+ uint32_t uid;
bool is_cxl = pci_bus_is_cxl(bus);
if (!pci_bus_is_root(bus)) {
@@ -156,6 +157,8 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)
nr_pcie_buses = bus_num;
}
+ uid = object_property_get_uint(OBJECT(bus), "acpi_uid",
+ &error_fatal);
dev = aml_device("PC%.02X", bus_num);
if (is_cxl) {
struct Aml *pkg = aml_package(2);
@@ -168,7 +171,7 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)
aml_append(dev, aml_name_decl("_CID", aml_string("PNP0A03")));
}
aml_append(dev, aml_name_decl("_BBN", aml_int(bus_num)));
- aml_append(dev, aml_name_decl("_UID", aml_int(bus_num)));
+ aml_append(dev, aml_name_decl("_UID", aml_int(uid)));
aml_append(dev, aml_name_decl("_STR", aml_unicode("pxb Device")));
aml_append(dev, aml_name_decl("_CCA", aml_int(1)));
if (numa_node != NUMA_NODE_UNASSIGNED) {
--
MST
- [PULL 01/65] softmmu: Expand comments describing max_bounce_buffer_size, (continued)
- [PULL 01/65] softmmu: Expand comments describing max_bounce_buffer_size, Michael S. Tsirkin, 2024/11/04
- [PULL 02/65] docs: fix vhost-user protocol doc, Michael S. Tsirkin, 2024/11/04
- [PULL 03/65] hw/acpi: Fix ordering of BDF in Generic Initiator PCI Device Handle., Michael S. Tsirkin, 2024/11/04
- [PULL 04/65] hw/acpi/GI: Fix trivial parameter alignment issue., Michael S. Tsirkin, 2024/11/04
- [PULL 05/65] hw/acpi: Move AML building code for Generic Initiators to aml_build.c, Michael S. Tsirkin, 2024/11/04
- [PULL 06/65] hw/acpi: Rename build_all_acpi_generic_initiators() to build_acpi_generic_initiator(), Michael S. Tsirkin, 2024/11/04
- [PULL 07/65] hw/pci: Add a busnr property to pci_props and use for acpi/gi, Michael S. Tsirkin, 2024/11/04
- [PULL 08/65] acpi/pci: Move Generic Initiator object handling into acpi/pci.*, Michael S. Tsirkin, 2024/11/04
- [PULL 09/65] hw/pci-bridge: Add acpi_uid property to TYPE_PXB_BUS, Michael S. Tsirkin, 2024/11/04
- [PULL 10/65] hw/i386/acpi: Use TYPE_PXB_BUS property acpi_uid for DSDT, Michael S. Tsirkin, 2024/11/04
- [PULL 11/65] hw/pci-host/gpex-acpi: Use acpi_uid property.,
Michael S. Tsirkin <=
- [PULL 12/65] hw/acpi: Generic Port Affinity Structure support, Michael S. Tsirkin, 2024/11/04
- [PULL 13/65] hw/acpi: Make storage of node id uint32_t to reduce fragility, Michael S. Tsirkin, 2024/11/04
- [PULL 14/65] hw/acpi: Generic Initiator - add missing object class property descriptions., Michael S. Tsirkin, 2024/11/04
- [PULL 15/65] hw/pci-bridge/cxl_root_port: Provide x-speed and x-width properties., Michael S. Tsirkin, 2024/11/04
- [PULL 16/65] hw/pci-bridge/cxl_upstream: Provide x-speed and x-width properties., Michael S. Tsirkin, 2024/11/04
- [PULL 17/65] hw/pcie: Factor out PCI Express link register filling common to EP., Michael S. Tsirkin, 2024/11/04
- [PULL 18/65] hw/pcie: Provide a utility function for control of EP / SW USP link, Michael S. Tsirkin, 2024/11/04
- [PULL 19/65] hw/mem/cxl-type3: Add properties to control link speed and width, Michael S. Tsirkin, 2024/11/04