diff options
-rw-r--r-- | fsdev/qemu-fsdev-opts.c | 2 | ||||
-rw-r--r-- | hw/acpi/core.c | 2 | ||||
-rw-r--r-- | hw/arm/exynos4_boards.c | 2 | ||||
-rw-r--r-- | hw/arm/gumstix.c | 2 | ||||
-rw-r--r-- | hw/arm/highbank.c | 2 | ||||
-rw-r--r-- | hw/arm/nseries.c | 2 | ||||
-rw-r--r-- | hw/arm/omap_sx1.c | 2 | ||||
-rw-r--r-- | hw/arm/realview.c | 2 | ||||
-rw-r--r-- | hw/arm/spitz.c | 2 | ||||
-rw-r--r-- | hw/arm/stellaris.c | 2 | ||||
-rw-r--r-- | hw/arm/versatilepb.c | 2 | ||||
-rw-r--r-- | hw/arm/vexpress.c | 2 | ||||
-rw-r--r-- | hw/arm/virt.c | 2 | ||||
-rw-r--r-- | hw/lm32/lm32_boards.c | 2 | ||||
-rw-r--r-- | hw/mips/mips_jazz.c | 2 | ||||
-rw-r--r-- | hw/ppc/ppc405_boards.c | 2 | ||||
-rw-r--r-- | hw/ppc/spapr.c | 2 | ||||
-rw-r--r-- | hw/s390x/s390-virtio-ccw.c | 2 | ||||
-rw-r--r-- | hw/smbios/smbios.c | 2 | ||||
-rw-r--r-- | hw/sparc/sun4m.c | 4 | ||||
-rw-r--r-- | hw/sparc64/sun4u.c | 4 | ||||
-rw-r--r-- | hw/xtensa/xtfpga.c | 2 | ||||
-rw-r--r-- | include/hw/boards.h | 2 | ||||
-rw-r--r-- | include/hw/i386/pc.h | 2 | ||||
-rw-r--r-- | include/qemu/module.h | 4 | ||||
-rw-r--r-- | ui/input-linux.c | 2 | ||||
-rw-r--r-- | ui/spice-core.c | 2 | ||||
-rw-r--r-- | ui/vnc.c | 2 | ||||
-rw-r--r-- | vl.c | 2 |
29 files changed, 28 insertions, 36 deletions
diff --git a/fsdev/qemu-fsdev-opts.c b/fsdev/qemu-fsdev-opts.c index 0b4619f44f..88a4ac3251 100644 --- a/fsdev/qemu-fsdev-opts.c +++ b/fsdev/qemu-fsdev-opts.c @@ -83,4 +83,4 @@ static void fsdev_register_config(void) qemu_add_opts(&qemu_fsdev_opts); qemu_add_opts(&qemu_virtfs_opts); } -machine_init(fsdev_register_config); +opts_init(fsdev_register_config); diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 3d9e5c4a02..31ead6490f 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -67,7 +67,7 @@ static void acpi_register_config(void) qemu_add_opts(&qemu_acpi_opts); } -machine_init(acpi_register_config); +opts_init(acpi_register_config); static int acpi_checksum(const uint8_t *data, int len) { diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c index 42faa8c48d..5b11cd9b4d 100644 --- a/hw/arm/exynos4_boards.c +++ b/hw/arm/exynos4_boards.c @@ -181,4 +181,4 @@ static void exynos4_machines_init(void) type_register_static(&smdkc210_type); } -machine_init(exynos4_machines_init) +type_init(exynos4_machines_init) diff --git a/hw/arm/gumstix.c b/hw/arm/gumstix.c index 626d338373..d59d9ba4e4 100644 --- a/hw/arm/gumstix.c +++ b/hw/arm/gumstix.c @@ -156,4 +156,4 @@ static void gumstix_machine_init(void) type_register_static(&verdex_type); } -machine_init(gumstix_machine_init) +type_init(gumstix_machine_init) diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index e25cf5e3f3..e37378c69f 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -437,4 +437,4 @@ static void calxeda_machines_init(void) type_register_static(&midway_type); } -machine_init(calxeda_machines_init) +type_init(calxeda_machines_init) diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index d9e61f7779..9a5f33bd8a 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -1450,4 +1450,4 @@ static void nseries_machine_init(void) type_register_static(&n810_type); } -machine_init(nseries_machine_init) +type_init(nseries_machine_init) diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c index 68236a39b2..cd50691d8b 100644 --- a/hw/arm/omap_sx1.c +++ b/hw/arm/omap_sx1.c @@ -252,4 +252,4 @@ static void sx1_machine_init(void) type_register_static(&sx1_machine_v2_type); } -machine_init(sx1_machine_init) +type_init(sx1_machine_init) diff --git a/hw/arm/realview.c b/hw/arm/realview.c index 90429fc456..481ae00fbc 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -457,4 +457,4 @@ static void realview_machine_init(void) type_register_static(&realview_pbx_a9_type); } -machine_init(realview_machine_init) +type_init(realview_machine_init) diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c index 607cb58a2f..c3048f3ea6 100644 --- a/hw/arm/spitz.c +++ b/hw/arm/spitz.c @@ -1037,7 +1037,7 @@ static void spitz_machine_init(void) type_register_static(&terrierpda_type); } -machine_init(spitz_machine_init) +type_init(spitz_machine_init) static bool is_version_0(void *opaque, int version_id) { diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index de8dbb2a0f..c3c72f1b49 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -1420,7 +1420,7 @@ static void stellaris_machine_init(void) type_register_static(&lm3s6965evb_type); } -machine_init(stellaris_machine_init) +type_init(stellaris_machine_init) static void stellaris_i2c_class_init(ObjectClass *klass, void *data) { diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index d061f0fd07..5f7523e355 100644 --- a/hw/arm/versatilepb.c +++ b/hw/arm/versatilepb.c @@ -419,7 +419,7 @@ static void versatile_machine_init(void) type_register_static(&versatileab_type); } -machine_init(versatile_machine_init) +type_init(versatile_machine_init) static void vpb_sic_class_init(ObjectClass *klass, void *data) { diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 726c4e0c55..769390c6c1 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -800,4 +800,4 @@ static void vexpress_machine_init(void) type_register_static(&vexpress_a15_info); } -machine_init(vexpress_machine_init); +type_init(vexpress_machine_init); diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 8c3ac0d952..95331a5662 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1428,4 +1428,4 @@ static void machvirt_machine_init(void) type_register_static(&machvirt_info); } -machine_init(machvirt_machine_init); +type_init(machvirt_machine_init); diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c index c5a848b06c..5b61b76f2e 100644 --- a/hw/lm32/lm32_boards.c +++ b/hw/lm32/lm32_boards.c @@ -329,4 +329,4 @@ static void lm32_machine_init(void) type_register_static(&lm32_uclinux_type); } -machine_init(lm32_machine_init) +type_init(lm32_machine_init) diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c index d6d8058602..4931cb1bf4 100644 --- a/hw/mips/mips_jazz.c +++ b/hw/mips/mips_jazz.c @@ -387,4 +387,4 @@ static void mips_jazz_machine_init(void) type_register_static(&mips_pica61_type); } -machine_init(mips_jazz_machine_init) +type_init(mips_jazz_machine_init) diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index 67978083c6..d8db3199c9 100644 --- a/hw/ppc/ppc405_boards.c +++ b/hw/ppc/ppc405_boards.c @@ -658,4 +658,4 @@ static void ppc405_machine_init(void) type_register_static(&taihu_type); } -machine_init(ppc405_machine_init) +type_init(ppc405_machine_init) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 79a70a9c0f..d0bb42305b 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2342,7 +2342,7 @@ static const TypeInfo spapr_machine_info = { { \ type_register(&spapr_machine_##suffix##_info); \ } \ - machine_init(spapr_machine_register_##suffix) + type_init(spapr_machine_register_##suffix) /* * pseries-2.6 diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 3d8c3c4fa8..4361c8a5dc 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -294,7 +294,7 @@ static const TypeInfo ccw_machine_info = { { \ type_register_static(&ccw_machine_##suffix##_info); \ } \ - machine_init(ccw_machine_register_##suffix) + type_init(ccw_machine_register_##suffix) #define CCW_COMPAT_2_5 \ HW_COMPAT_2_5 diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 3b5f9bd534..1362e79b9b 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -320,7 +320,7 @@ static void smbios_register_config(void) qemu_add_opts(&qemu_smbios_opts); } -machine_init(smbios_register_config); +opts_init(smbios_register_config); static void smbios_validate_table(void) { diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index eebef37897..613ca7e332 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -1553,10 +1553,7 @@ static void sun4m_register_types(void) type_register_static(&afx_info); type_register_static(&prom_info); type_register_static(&ram_info); -} -static void sun4m_machine_init(void) -{ type_register_static(&ss5_type); type_register_static(&ss10_type); type_register_static(&ss600mp_type); @@ -1569,4 +1566,3 @@ static void sun4m_machine_init(void) } type_init(sun4m_register_types) -machine_init(sun4m_machine_init) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 0a6f453858..54d200300c 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -997,14 +997,10 @@ static void sun4u_register_types(void) type_register_static(&ebus_info); type_register_static(&prom_info); type_register_static(&ram_info); -} -static void sun4u_machine_init(void) -{ type_register_static(&sun4u_type); type_register_static(&sun4v_type); type_register_static(&niagara_type); } type_init(sun4u_register_types) -machine_init(sun4u_machine_init) diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index ed09b9d809..54e7f46868 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -510,4 +510,4 @@ static void xtensa_lx_machines_init(void) type_register_static(&xtensa_kc705_type); } -machine_init(xtensa_lx_machines_init) +type_init(xtensa_lx_machines_init) diff --git a/include/hw/boards.h b/include/hw/boards.h index 4b3fdbea9d..8efce0f91e 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -181,7 +181,7 @@ struct MachineState { { \ type_register_static(&machine_initfn##_typeinfo); \ } \ - machine_init(machine_initfn##_register_types) + type_init(machine_initfn##_register_types) #define SET_MACHINE_COMPAT(m, COMPAT) \ do { \ diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 8c2bf7fd67..847d92f550 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -858,7 +858,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); { \ type_register(&pc_machine_type_##suffix); \ } \ - machine_init(pc_machine_init_##suffix) + type_init(pc_machine_init_##suffix) extern void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id); #endif diff --git a/include/qemu/module.h b/include/qemu/module.h index 85fafa2e79..2370708445 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -41,14 +41,14 @@ static void __attribute__((constructor)) do_qemu_init_ ## function(void) \ typedef enum { MODULE_INIT_BLOCK, - MODULE_INIT_MACHINE, + MODULE_INIT_OPTS, MODULE_INIT_QAPI, MODULE_INIT_QOM, MODULE_INIT_MAX } module_init_type; #define block_init(function) module_init(function, MODULE_INIT_BLOCK) -#define machine_init(function) module_init(function, MODULE_INIT_MACHINE) +#define opts_init(function) module_init(function, MODULE_INIT_OPTS) #define qapi_init(function) module_init(function, MODULE_INIT_QAPI) #define type_init(function) module_init(function, MODULE_INIT_QOM) diff --git a/ui/input-linux.c b/ui/input-linux.c index 0bc0405ec6..2cf5d4990c 100644 --- a/ui/input-linux.c +++ b/ui/input-linux.c @@ -388,4 +388,4 @@ static void input_linux_register_config(void) { qemu_add_opts(&qemu_input_linux_opts); } -machine_init(input_linux_register_config); +opts_init(input_linux_register_config); diff --git a/ui/spice-core.c b/ui/spice-core.c index a68a665a9a..e1179258d0 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -945,4 +945,4 @@ static void spice_register_config(void) { qemu_add_opts(&qemu_spice_opts); } -machine_init(spice_register_config); +opts_init(spice_register_config); @@ -3875,4 +3875,4 @@ static void vnc_register_config(void) { qemu_add_opts(&qemu_vnc_opts); } -machine_init(vnc_register_config); +opts_init(vnc_register_config); @@ -3021,6 +3021,7 @@ int main(int argc, char **argv, char **envp) qemu_add_opts(&qemu_icount_opts); qemu_add_opts(&qemu_semihosting_config_opts); qemu_add_opts(&qemu_fw_cfg_opts); + module_call_init(MODULE_INIT_OPTS); runstate_init(); @@ -3033,7 +3034,6 @@ int main(int argc, char **argv, char **envp) QLIST_INIT (&vm_change_state_head); os_setup_early_signal_handling(); - module_call_init(MODULE_INIT_MACHINE); cpu_model = NULL; snapshot = 0; cyls = heads = secs = 0; |