mirror of https://github.com/xemu-project/xemu.git
hw/i386/pc: Remove 'host_type' argument from pc_init1()
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>
This commit is contained in:
parent
07df0c3951
commit
3ac5f6725a
|
@ -101,8 +101,7 @@ static void piix_intx_routing_notifier_xen(PCIDevice *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PC hardware initialisation */
|
/* PC hardware initialisation */
|
||||||
static void pc_init1(MachineState *machine,
|
static void pc_init1(MachineState *machine, const char *pci_type)
|
||||||
const char *host_type, const char *pci_type)
|
|
||||||
{
|
{
|
||||||
PCMachineState *pcms = PC_MACHINE(machine);
|
PCMachineState *pcms = PC_MACHINE(machine);
|
||||||
PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
|
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);
|
memory_region_init(pci_memory, NULL, "pci", UINT64_MAX);
|
||||||
rom_memory = pci_memory;
|
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_add_child(OBJECT(machine), "i440fx", phb);
|
||||||
object_property_set_link(phb, PCI_HOST_PROP_RAM_MEM,
|
object_property_set_link(phb, PCI_HOST_PROP_RAM_MEM,
|
||||||
OBJECT(ram_memory), &error_fatal);
|
OBJECT(ram_memory), &error_fatal);
|
||||||
|
@ -451,7 +450,7 @@ static void pc_compat_2_0_fn(MachineState *machine)
|
||||||
#ifdef CONFIG_ISAPC
|
#ifdef CONFIG_ISAPC
|
||||||
static void pc_init_isa(MachineState *machine)
|
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
|
#endif
|
||||||
|
|
||||||
|
@ -461,9 +460,7 @@ static void pc_xen_hvm_init_pci(MachineState *machine)
|
||||||
const char *pci_type = xen_igd_gfx_pt_enabled() ?
|
const char *pci_type = xen_igd_gfx_pt_enabled() ?
|
||||||
TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE : TYPE_I440FX_PCI_DEVICE;
|
TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE : TYPE_I440FX_PCI_DEVICE;
|
||||||
|
|
||||||
pc_init1(machine,
|
pc_init1(machine, pci_type);
|
||||||
TYPE_I440FX_PCI_HOST_BRIDGE,
|
|
||||||
pci_type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pc_xen_hvm_init(MachineState *machine)
|
static void pc_xen_hvm_init(MachineState *machine)
|
||||||
|
@ -488,8 +485,7 @@ static void pc_xen_hvm_init(MachineState *machine)
|
||||||
if (compat) { \
|
if (compat) { \
|
||||||
compat(machine); \
|
compat(machine); \
|
||||||
} \
|
} \
|
||||||
pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
pc_init1(machine, TYPE_I440FX_PCI_DEVICE); \
|
||||||
TYPE_I440FX_PCI_DEVICE); \
|
|
||||||
} \
|
} \
|
||||||
DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn)
|
DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue