[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v2 15/39] piix: Make all *machine_options() functions
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [RFC v2 15/39] piix: Make all *machine_options() functions call the previous one |
Date: |
Fri, 13 Jun 2014 16:43:54 -0300 |
This adds a little more boilerplate code, but makes all
*machine_options() and *class_init() functions follow exactly the same
nesting pattern, making it much easier to eliminate *machine_options()
later.
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/i386/pc_piix.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 05d1241..1c5f4b5 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -462,6 +462,12 @@ static TypeInfo pc_i440fx_machine_v2_0_type_info = {
.class_init = pc_i440fx_machine_v2_0_class_init,
};
+static void pc_i440fx_1_7_machine_options(MachineClass *mc)
+{
+ pc_i440fx_2_1_machine_options(mc);
+ mc->default_machine_opts = NULL;
+}
+
static void pc_i440fx_machine_v1_7_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
@@ -469,6 +475,7 @@ static void pc_i440fx_machine_v1_7_class_init(ObjectClass
*oc, void *data)
PC_COMPAT_1_7,
{ /* end of list */ }
};
+ pc_i440fx_1_7_machine_options(mc);
mc->init = pc_init_pci_1_7;
mc->name = "pc-i440fx-1.7";
machine_class_add_compat_props(mc, compat_props);
@@ -487,6 +494,7 @@ static void pc_i440fx_machine_v1_6_class_init(ObjectClass
*oc, void *data)
PC_COMPAT_1_6,
{ /* end of list */ }
};
+ pc_i440fx_1_7_machine_options(mc);
mc->init = pc_init_pci_1_6;
mc->name = "pc-i440fx-1.6";
machine_class_add_compat_props(mc, compat_props);
@@ -505,6 +513,7 @@ static void pc_i440fx_machine_v1_5_class_init(ObjectClass
*oc, void *data)
PC_COMPAT_1_5,
{ /* end of list */ }
};
+ pc_i440fx_1_7_machine_options(mc);
mc->init = pc_init_pci_1_5;
mc->name = "pc-i440fx-1.5";
machine_class_add_compat_props(mc, compat_props);
@@ -518,6 +527,7 @@ static TypeInfo pc_i440fx_machine_v1_5_type_info = {
static void pc_i440fx_1_4_machine_options(MachineClass *mc)
{
+ pc_i440fx_1_7_machine_options(mc);
mc->hot_add_cpu = NULL;
}
--
1.9.0
- [Qemu-devel] [RFC v2 05/39] piix: Move pc-0.11 drive version compat props TO PC_COMPAT_0_11, (continued)
- [Qemu-devel] [RFC v2 05/39] piix: Move pc-0.11 drive version compat props TO PC_COMPAT_0_11, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 06/39] vl.c: Use qdev_prop_register_global() for single globals, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 07/39] machine: Make compat_props a linked list, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 08/39] pc: Register machine classes directly instead of using QEMUMachine, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 10/39] pc: Eliminate pc_default_machine_options(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 09/39] pc: Eliminate pc_common_machine_options(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 11/39] piix: Eliminate pc_i440fx_machine_options(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 13/39] q35: Eliminate pc_q35_1_4_machine_options(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 12/39] q35: Eliminate pc_q35_machine_options(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 14/39] pc: Eliminate *machine_options macros, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 15/39] piix: Make all *machine_options() functions call the previous one,
Eduardo Habkost <=
- [Qemu-devel] [RFC v2 16/39] pc: Eliminate all *_machine_options() functions, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 21/39] pc: Move smbios_defaults to PCMachineClass, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 22/39] pc: Move has_acpi_build to PCMachineClass, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 23/39] pc: Move has_pci_info to PCMachineClass, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 24/39] pc: Move gigabyte_align to PCMachineClass, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 04/39] piix: Move pc-0.1[23] rombar compat props to PC_COMPAT_0_13, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 25/39] pc: Move has_reserved_memory to PCMachineClass, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 26/39] pc: Move option_rom_has_mr/rom_file_has_mr to MachineClass, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 27/39] piix: Eliminate pc_init_pci(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 28/39] piix: Introduce struct PCI440FXMachineClass, Eduardo Habkost, 2014/06/13