ppc: convert g_new(qemu_irq usages to g_new0
To indicate the IRQs are initially disconnected. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
c75f3c041a
commit
aa2ac1dac3
|
@ -1627,7 +1627,7 @@ static void openpic_realize(DeviceState *dev, Error **errp)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < opp->nb_cpus; i++) {
|
for (i = 0; i < opp->nb_cpus; i++) {
|
||||||
opp->dst[i].irqs = g_new(qemu_irq, OPENPIC_OUTPUT_NB);
|
opp->dst[i].irqs = g_new0(qemu_irq, OPENPIC_OUTPUT_NB);
|
||||||
for (j = 0; j < OPENPIC_OUTPUT_NB; j++) {
|
for (j = 0; j < OPENPIC_OUTPUT_NB; j++) {
|
||||||
sysbus_init_irq(d, &opp->dst[i].irqs[j]);
|
sysbus_init_irq(d, &opp->dst[i].irqs[j]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -583,7 +583,7 @@ static qemu_irq *ppce500_init_mpic(PPCE500Params *params, MemoryRegion *ccsr,
|
||||||
SysBusDevice *s;
|
SysBusDevice *s;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
mpic = g_new(qemu_irq, 256);
|
mpic = g_new0(qemu_irq, 256);
|
||||||
|
|
||||||
if (kvm_enabled()) {
|
if (kvm_enabled()) {
|
||||||
QemuOpts *machine_opts = qemu_get_machine_opts();
|
QemuOpts *machine_opts = qemu_get_machine_opts();
|
||||||
|
|
|
@ -346,7 +346,7 @@ static void ppc_core99_init(MachineState *machine)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pic = g_new(qemu_irq, 64);
|
pic = g_new0(qemu_irq, 64);
|
||||||
|
|
||||||
dev = qdev_create(NULL, TYPE_OPENPIC);
|
dev = qdev_create(NULL, TYPE_OPENPIC);
|
||||||
qdev_prop_set_uint32(dev, "model", OPENPIC_MODEL_RAVEN);
|
qdev_prop_set_uint32(dev, "model", OPENPIC_MODEL_RAVEN);
|
||||||
|
|
Loading…
Reference in a new issue