[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/6] hw: Use pci_bus_add_fw_cfg_extra_pci_roots()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 5/6] hw: Use pci_bus_add_fw_cfg_extra_pci_roots() |
Date: |
Fri, 6 Dec 2024 19:13:51 +0100 |
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>
---
hw/arm/virt.c | 3 ++-
hw/hppa/machine.c | 2 +-
hw/i386/pc.c | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 1a381e9a2bd..191e1d65a8f 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 a31dc32a9f7..4e673353225 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 317aaca25a0..3a656f398fd 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -628,7 +628,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) {
--
2.45.2
- [PATCH 0/6] hw/nvram/fw_cfg: Move PCI bus methods out, Philippe Mathieu-Daudé, 2024/12/06
- [PATCH 1/6] hw/nvram/fw_cfg: Rename fw_cfg_add_[file]_from_generator(), Philippe Mathieu-Daudé, 2024/12/06
- [PATCH 2/6] hw/nvram/fw_cfg: Pass QOM parent to fw_cfg_add_file_from_generator(), Philippe Mathieu-Daudé, 2024/12/06
- [PATCH 3/6] hw/pci: Have PCI_BUS implement TYPE_FW_CFG_DATA_GENERATOR_INTERFACE, Philippe Mathieu-Daudé, 2024/12/06
- [PATCH 4/6] hw/pci: Add pci_bus_add_fw_cfg_extra_pci_roots() helper, Philippe Mathieu-Daudé, 2024/12/06
- [PATCH 5/6] hw: Use pci_bus_add_fw_cfg_extra_pci_roots(),
Philippe Mathieu-Daudé <=
- [PATCH 6/6] hw/nvram/fw_cfg: Remove fw_cfg_add_extra_pci_roots(), Philippe Mathieu-Daudé, 2024/12/06
- Re: [PATCH 0/6] hw/nvram/fw_cfg: Move PCI bus methods out, Philippe Mathieu-Daudé, 2024/12/13