aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-12-06 17:14:19 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-12-14 00:16:20 +0100
commite5fd678a0d2489baa9af0c91408b93474836afcf (patch)
treed94905fc07a262aaafaa56a13a38b78b290735e5
parent14f1f86d5111ed2dae19ae15da81a98ea048017d (diff)
downloadqemu-e5fd678a0d2489baa9af0c91408b93474836afcf.zip
qemu-e5fd678a0d2489baa9af0c91408b93474836afcf.tar.gz
qemu-e5fd678a0d2489baa9af0c91408b93474836afcf.tar.bz2
hw: Use pci_bus_add_fw_cfg_extra_pci_roots()
We want to remove fw_cfg_add_extra_pci_roots() which introduced PCI bus knowledge within the generic hw/nvram/fw_cfg.c file. Replace the calls by the pci_bus_add_fw_cfg_extra_pci_roots() which is a 1:1 equivalent, but using correct API. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20241206181352.6836-6-philmd@linaro.org>
-rw-r--r--hw/arm/virt.c3
-rw-r--r--hw/hppa/machine.c2
-rw-r--r--hw/i386/pc.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 3bd9dd0..333eaf6 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1750,7 +1750,8 @@ void virt_machine_done(Notifier *notifier, void *data)
exit(1);
}
- fw_cfg_add_extra_pci_roots(vms->bus, vms->fw_cfg);
+ pci_bus_add_fw_cfg_extra_pci_roots(vms->fw_cfg, vms->bus,
+ &error_abort);
virt_acpi_setup(vms);
virt_build_smbios(vms);
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index a31dc32..4e67335 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -240,7 +240,7 @@ static FWCfgState *create_fw_cfg(MachineState *ms, PCIBus *pci_bus,
g_memdup2(qemu_version, sizeof(qemu_version)),
sizeof(qemu_version));
- fw_cfg_add_extra_pci_roots(pci_bus, fw_cfg);
+ pci_bus_add_fw_cfg_extra_pci_roots(fw_cfg, pci_bus, &error_abort);
return fw_cfg;
}
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 99b9b10..92047ce 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -631,7 +631,8 @@ void pc_machine_done(Notifier *notifier, void *data)
/* set the number of CPUs */
x86_rtc_set_cpus_count(x86ms->rtc, x86ms->boot_cpus);
- fw_cfg_add_extra_pci_roots(pcms->pcibus, x86ms->fw_cfg);
+ pci_bus_add_fw_cfg_extra_pci_roots(x86ms->fw_cfg, pcms->pcibus,
+ &error_abort);
acpi_setup();
if (x86ms->fw_cfg) {