[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/43] hw/i386/pc: Remove 'host_type' argument from pc_init1()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 21/43] hw/i386/pc: Remove 'host_type' argument from pc_init1() |
Date: |
Sat, 9 Mar 2024 20:21:48 +0100 |
All callers use host_type=TYPE_I440FX_PCI_HOST_BRIDGE.
Directly use this definition within pc_init1().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240301185936.95175-4-philmd@linaro.org>
---
hw/i386/pc_piix.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ed777e3d61..e14dce951d 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -101,8 +101,7 @@ static void piix_intx_routing_notifier_xen(PCIDevice *dev)
}
/* PC hardware initialisation */
-static void pc_init1(MachineState *machine,
- const char *host_type, const char *pci_type)
+static void pc_init1(MachineState *machine, const char *pci_type)
{
PCMachineState *pcms = PC_MACHINE(machine);
PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
@@ -194,7 +193,7 @@ static void pc_init1(MachineState *machine,
memory_region_init(pci_memory, NULL, "pci", UINT64_MAX);
rom_memory = pci_memory;
- phb = OBJECT(qdev_new(host_type));
+ phb = OBJECT(qdev_new(TYPE_I440FX_PCI_HOST_BRIDGE));
object_property_add_child(OBJECT(machine), "i440fx", phb);
object_property_set_link(phb, PCI_HOST_PROP_RAM_MEM,
OBJECT(ram_memory), &error_fatal);
@@ -451,7 +450,7 @@ static void pc_compat_2_0_fn(MachineState *machine)
#ifdef CONFIG_ISAPC
static void pc_init_isa(MachineState *machine)
{
- pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, TYPE_I440FX_PCI_DEVICE);
+ pc_init1(machine, TYPE_I440FX_PCI_DEVICE);
}
#endif
@@ -461,9 +460,7 @@ static void pc_xen_hvm_init_pci(MachineState *machine)
const char *pci_type = xen_igd_gfx_pt_enabled() ?
TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE :
TYPE_I440FX_PCI_DEVICE;
- pc_init1(machine,
- TYPE_I440FX_PCI_HOST_BRIDGE,
- pci_type);
+ pc_init1(machine, pci_type);
}
static void pc_xen_hvm_init(MachineState *machine)
@@ -488,8 +485,7 @@ static void pc_xen_hvm_init(MachineState *machine)
if (compat) { \
compat(machine); \
} \
- pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
- TYPE_I440FX_PCI_DEVICE); \
+ pc_init1(machine, TYPE_I440FX_PCI_DEVICE); \
} \
DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn)
--
2.41.0
- [PULL 11/43] hw/i386/xen: Compile 'xen-hvm.c' with Xen CPPFLAGS, (continued)
- [PULL 11/43] hw/i386/xen: Compile 'xen-hvm.c' with Xen CPPFLAGS, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 12/43] hw/xen/hvm: Inline TARGET_PAGE_ALIGN() macro, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 13/43] hw/xen/hvm: Propagate page_mask to a pair of functions, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 14/43] hw/xen/hvm: Get target page size at runtime, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 15/43] hw/char/xen_console: Fix missing ERRP_GUARD() for error_prepend(), Philippe Mathieu-Daudé, 2024/03/09
- [PULL 16/43] hw/net/xen_nic: Fix missing ERRP_GUARD() for error_prepend(), Philippe Mathieu-Daudé, 2024/03/09
- [PULL 17/43] hw/remote/remote-obj: hw/misc/ivshmem: Fix missing ERRP_GUARD() for error_prepend(), Philippe Mathieu-Daudé, 2024/03/09
- [PULL 19/43] hw/i386/pc: Remove pc_compat_1_4..1.7[] left over declarations, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 18/43] target/i386/sev: Fix missing ERRP_GUARD() for error_prepend(), Philippe Mathieu-Daudé, 2024/03/09
- [PULL 20/43] hw/i386/pc: Use generated NotifyVmexitOption_str(), Philippe Mathieu-Daudé, 2024/03/09
- [PULL 21/43] hw/i386/pc: Remove 'host_type' argument from pc_init1(),
Philippe Mathieu-Daudé <=
- [PULL 22/43] hw/i386/pc: Have pc_init_isa() pass a NULL pci_type argument, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 23/43] hw/intc/apic: fix memory leak, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 24/43] qdev: Add a granule_mode property, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 25/43] hmp: Add option to info qtree to omit details, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 26/43] mac_newworld: change timebase frequency from 100MHz to 25MHz for mac99 machine, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 27/43] hw/intc/grlib_irqmp: abort realize when ncpus value is out of range, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 29/43] docs/interop/firmware.json: Fix doc for FirmwareFlashMode, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 28/43] docs/interop/firmware.json: Align examples, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 31/43] hw/core/machine-smp: Deprecate unsupported "parameter=1" SMP configurations, Philippe Mathieu-Daudé, 2024/03/09
- [PULL 32/43] hw/core/machine-smp: Calculate total CPUs once in machine_parse_smp_config(), Philippe Mathieu-Daudé, 2024/03/09