aboutsummaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2023-03-02 17:15:41 +0100
committerMichael S. Tsirkin <mst@redhat.com>2023-03-07 12:39:00 -0500
commit02c106139a5c01a5668246c748939b5a4bb0c467 (patch)
tree41a4ccde6fdbc308674cfaf4a13840dc7d43e70c /hw/i386
parent62dd55fcf736994958eb5706cee5806480acfe25 (diff)
acpi: pci: move out ACPI PCI hotplug generator from generic slot generator build_append_pci_bus_devices()
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20230302161543.286002-33-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/acpi-build.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 0459acfbb4..ec857a117e 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -520,7 +520,7 @@ static bool is_devfn_ignored_hotplug(const int devfn, const PCIBus *bus)
return false;
}
-static void build_append_pcihp_slots(Aml *parent_scope, PCIBus *bus)
+void build_append_pcihp_slots(Aml *parent_scope, PCIBus *bus)
{
int devfn;
Aml *dev, *notify_method = NULL, *method;
@@ -599,10 +599,6 @@ void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus)
/* device descriptor has been composed, add it into parent context */
aml_append(parent_scope, dev);
}
-
- if (object_property_find(OBJECT(bus), ACPI_PCIHP_PROP_BSEL)) {
- build_append_pcihp_slots(parent_scope, bus);
- }
}
static bool build_append_notfication_callback(Aml *parent_scope,
@@ -1790,6 +1786,9 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
Aml *scope = aml_scope("PCI0");
/* Scan all PCI buses. Generate tables to support hotplug. */
build_append_pci_bus_devices(scope, bus);
+ if (object_property_find(OBJECT(bus), ACPI_PCIHP_PROP_BSEL)) {
+ build_append_pcihp_slots(scope, bus);
+ }
aml_append(sb_scope, scope);
}
}