mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
Revert use of DEFINE_MACHINE() for registrations of multiple machines
The script used for converting from QEMUMachine had used one DEFINE_MACHINE() per machine registered. In cases where multiple machines are registered from one source file, avoid the excessive generation of module init functions by reverting this unrolling. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
e264d29de2
commit
8a661aea0e
15 changed files with 484 additions and 88 deletions
|
@ -369,13 +369,19 @@ static void ref405ep_init(MachineState *machine)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void ref405ep_machine_init(MachineClass *mc)
|
||||
static void ref405ep_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
MachineClass *mc = MACHINE_CLASS(oc);
|
||||
|
||||
mc->desc = "ref405ep";
|
||||
mc->init = ref405ep_init;
|
||||
}
|
||||
|
||||
DEFINE_MACHINE("ref405ep", ref405ep_machine_init)
|
||||
static const TypeInfo ref405ep_type = {
|
||||
.name = MACHINE_TYPE_NAME("ref405ep"),
|
||||
.parent = TYPE_MACHINE,
|
||||
.class_init = ref405ep_class_init,
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* AMCC Taihu evaluation board */
|
||||
|
@ -667,10 +673,24 @@ static void taihu_405ep_init(MachineState *machine)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void taihu_machine_init(MachineClass *mc)
|
||||
static void taihu_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
MachineClass *mc = MACHINE_CLASS(oc);
|
||||
|
||||
mc->desc = "taihu";
|
||||
mc->init = taihu_405ep_init;
|
||||
}
|
||||
|
||||
DEFINE_MACHINE("taihu", taihu_machine_init)
|
||||
static const TypeInfo taihu_type = {
|
||||
.name = MACHINE_TYPE_NAME("taihu"),
|
||||
.parent = TYPE_MACHINE,
|
||||
.class_init = taihu_class_init,
|
||||
};
|
||||
|
||||
static void ppc405_machine_init(void)
|
||||
{
|
||||
type_register_static(&ref405ep_type);
|
||||
type_register_static(&taihu_type);
|
||||
}
|
||||
|
||||
machine_init(ppc405_machine_init)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue