Machine Core queue, 2016-03-16

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJW6ayeAAoJECgHk2+YTcWm428QAI+euBsYYv/bvmqMPH7zr9BW
 u4QDqDxZKCPOD4THgN0c0fmAaxWPQ0DTyUjf9K6L/pqihJL+3wP2wygi8VLfdZCx
 QY+bZlA0XOjDsVnZMH+i5OVJJcjtA/qDdMJDjG9kEwWMj/BmiQK4+l5HPOqd9EKl
 7dDaF2uoeRcEXGIHjKp7fMSWY+Eq1Go8H2rh1vusg4N6tbWr0WZGKQbxRfj/2z52
 VHsjCZetifeNy9QrxYcmyGbno93cSlKGwLA1QL9mj8/YWn7rJR6MnXbWU9nwi4Sz
 Xcl7yh5Ewf6R4O7u2y7sU9RGTx3CodkjvvonwXeShf+a18tH6ayzRVzAfydUWGKQ
 BcD7ZBb+gIqYvVOW9RgQ4RTDO95b+7/0oJ6aS+Wbn3PnIr2FdPzckIPHVN0MFizf
 4o5wG0YqnE7ApNKj4P2a3MfsS4DkCxBGkIbHkye2aYJt3wm0yhFq5n4bb1VnsyAg
 zecbiB5f4V0JJm7xmSQveokeiYCJ0B5Y1GZ4gfPo0F3AxUQi2jj8ffvk4VAhcDJR
 HMhaRb7EMGfHUJsMO9zWPk5Dsh+BEs0nUDx8GJJs+VITtWSoFZU6k8HnK1nO3JR+
 Tb3+0YnqhgBwcS9Hn1KyA0w1V6Go+Xk2xFlq/iRQOtFKsJgMEo9s5JFJR92yYh4i
 sIvvgffZVkSuXibs5ABe
 =OgVg
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ehabkost/tags/machine-pull-request' into staging

Machine Core queue, 2016-03-16

# gpg: Signature made Wed 16 Mar 2016 18:57:34 GMT using RSA key ID 984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"

* remotes/ehabkost/tags/machine-pull-request:
  module: Rename machine_init() to opts_init()
  machine: Use type_init() to register machine classes

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2016-03-17 08:52:58 +00:00
commit 8c45754724
29 changed files with 28 additions and 36 deletions

View File

@ -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);

View File

@ -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)
{

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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);

View File

@ -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);

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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)
{

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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 { \

View File

@ -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

View File

@ -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)

View File

@ -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);

View File

@ -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);

View File

@ -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);

2
vl.c
View File

@ -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;