mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -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
|
@ -1366,21 +1366,41 @@ static void lm3s6965evb_init(MachineState *machine)
|
|||
stellaris_init(kernel_filename, cpu_model, &stellaris_boards[1]);
|
||||
}
|
||||
|
||||
static void lm3s811evb_machine_init(MachineClass *mc)
|
||||
static void lm3s811evb_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
MachineClass *mc = MACHINE_CLASS(oc);
|
||||
|
||||
mc->desc = "Stellaris LM3S811EVB";
|
||||
mc->init = lm3s811evb_init;
|
||||
}
|
||||
|
||||
DEFINE_MACHINE("lm3s811evb", lm3s811evb_machine_init)
|
||||
static const TypeInfo lm3s811evb_type = {
|
||||
.name = MACHINE_TYPE_NAME("lm3s811evb"),
|
||||
.parent = TYPE_MACHINE,
|
||||
.class_init = lm3s811evb_class_init,
|
||||
};
|
||||
|
||||
static void lm3s6965evb_machine_init(MachineClass *mc)
|
||||
static void lm3s6965evb_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
MachineClass *mc = MACHINE_CLASS(oc);
|
||||
|
||||
mc->desc = "Stellaris LM3S6965EVB";
|
||||
mc->init = lm3s6965evb_init;
|
||||
}
|
||||
|
||||
DEFINE_MACHINE("lm3s6965evb", lm3s6965evb_machine_init)
|
||||
static const TypeInfo lm3s6965evb_type = {
|
||||
.name = MACHINE_TYPE_NAME("lm3s6965evb"),
|
||||
.parent = TYPE_MACHINE,
|
||||
.class_init = lm3s6965evb_class_init,
|
||||
};
|
||||
|
||||
static void stellaris_machine_init(void)
|
||||
{
|
||||
type_register_static(&lm3s811evb_type);
|
||||
type_register_static(&lm3s6965evb_type);
|
||||
}
|
||||
|
||||
machine_init(stellaris_machine_init)
|
||||
|
||||
static void stellaris_i2c_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue