sysbus: apic: ioapic: convert to QEMU Object Model

This converts three devices because apic and ioapic are subclasses of sysbus.
Converting subclasses independently of their base class is prohibitively hard.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2012-01-24 13:12:29 -06:00
parent 40021f0888
commit 999e12bbe8
131 changed files with 2734 additions and 1297 deletions

View file

@ -404,16 +404,25 @@ static int slavio_timer_init1(SysBusDevice *dev)
return 0;
}
static SysBusDeviceInfo slavio_timer_info = {
.init = slavio_timer_init1,
.qdev.name = "slavio_timer",
.qdev.size = sizeof(SLAVIO_TIMERState),
.qdev.vmsd = &vmstate_slavio_timer,
.qdev.reset = slavio_timer_reset,
.qdev.props = (Property[]) {
DEFINE_PROP_UINT32("num_cpus", SLAVIO_TIMERState, num_cpus, 0),
DEFINE_PROP_END_OF_LIST(),
}
static Property slavio_timer_properties[] = {
DEFINE_PROP_UINT32("num_cpus", SLAVIO_TIMERState, num_cpus, 0),
DEFINE_PROP_END_OF_LIST(),
};
static void slavio_timer_class_init(ObjectClass *klass, void *data)
{
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = slavio_timer_init1;
}
static DeviceInfo slavio_timer_info = {
.name = "slavio_timer",
.size = sizeof(SLAVIO_TIMERState),
.vmsd = &vmstate_slavio_timer,
.reset = slavio_timer_reset,
.props = slavio_timer_properties,
.class_init = slavio_timer_class_init,
};
static void slavio_timer_register_devices(void)