aboutsummaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-10 07:32:25 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-06-15 22:05:28 +0200
commit9fc7fc4d3909817555ce0af6bcb69dff1606140d (patch)
tree223b3f8397ee9ee93e6b652daf423f5ec02052ac /hw/arm
parent19dc7e977c145cf3683dc5d18d54ef3629e34619 (diff)
downloadqemu-9fc7fc4d3909817555ce0af6bcb69dff1606140d.zip
qemu-9fc7fc4d3909817555ce0af6bcb69dff1606140d.tar.gz
qemu-9fc7fc4d3909817555ce0af6bcb69dff1606140d.tar.bz2
qom: Less verbose object_initialize_child()
All users of object_initialize_child() pass the obvious child size argument. Almost all pass &error_abort and no properties. Tiresome. Rename object_initialize_child() to object_initialize_child_with_props() to free the name. New convenience wrapper object_initialize_child() automates the size argument, and passes &error_abort and no properties. Rename object_initialize_childv() to object_initialize_child_with_propsv() for consistency. Convert callers with this Coccinelle script: @@ expression parent, propname, type; expression child, size; symbol error_abort; @@ - object_initialize_child(parent, propname, OBJECT(child), size, type, &error_abort, NULL) + object_initialize_child(parent, propname, child, size, type, &error_abort, NULL) @@ expression parent, propname, type; expression child; symbol error_abort; @@ - object_initialize_child(parent, propname, child, sizeof(*child), type, &error_abort, NULL) + object_initialize_child(parent, propname, child, type) @@ expression parent, propname, type; expression child; symbol error_abort; @@ - object_initialize_child(parent, propname, &child, sizeof(child), type, &error_abort, NULL) + object_initialize_child(parent, propname, &child, type) @@ expression parent, propname, type; expression child, size, err; expression list props; @@ - object_initialize_child(parent, propname, child, size, type, err, props) + object_initialize_child_with_props(parent, propname, child, size, type, err, props) Note that Coccinelle chokes on ARMSSE typedef vs. macro in hw/arm/armsse.c. Worked around by temporarily renaming the macro for the spatch run. Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> [Rebased: machine opentitan is new (commit fe0fe4735e7)] Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200610053247.1583243-37-armbru@redhat.com>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/allwinner-a10.c5
-rw-r--r--hw/arm/allwinner-h3.c5
-rw-r--r--hw/arm/armsse.c26
-rw-r--r--hw/arm/aspeed.c4
-rw-r--r--hw/arm/aspeed_ast2600.c4
-rw-r--r--hw/arm/aspeed_soc.c4
-rw-r--r--hw/arm/bcm2836.c3
-rw-r--r--hw/arm/digic.c4
-rw-r--r--hw/arm/exynos4210.c3
-rw-r--r--hw/arm/fsl-imx25.c4
-rw-r--r--hw/arm/fsl-imx31.c4
-rw-r--r--hw/arm/fsl-imx6.c5
-rw-r--r--hw/arm/fsl-imx6ul.c4
-rw-r--r--hw/arm/fsl-imx7.c5
-rw-r--r--hw/arm/imx25_pdk.c3
-rw-r--r--hw/arm/kzm.c3
-rw-r--r--hw/arm/mps2-tz.c14
-rw-r--r--hw/arm/musca.c14
-rw-r--r--hw/arm/raspi.c4
-rw-r--r--hw/arm/stm32f405_soc.c6
-rw-r--r--hw/arm/xlnx-versal.c5
-rw-r--r--hw/arm/xlnx-zcu102.c3
-rw-r--r--hw/arm/xlnx-zynqmp.c16
23 files changed, 55 insertions, 93 deletions
diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
index 6e1329a..49c5146 100644
--- a/hw/arm/allwinner-a10.c
+++ b/hw/arm/allwinner-a10.c
@@ -41,9 +41,8 @@ static void aw_a10_init(Object *obj)
{
AwA10State *s = AW_A10(obj);
- object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
- ARM_CPU_TYPE_NAME("cortex-a8"),
- &error_abort, NULL);
+ object_initialize_child(obj, "cpu", &s->cpu,
+ ARM_CPU_TYPE_NAME("cortex-a8"));
sysbus_init_child_obj(obj, "intc", &s->intc, sizeof(s->intc),
TYPE_AW_A10_PIC);
diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c
index f10674d..7dc3671 100644
--- a/hw/arm/allwinner-h3.c
+++ b/hw/arm/allwinner-h3.c
@@ -194,9 +194,8 @@ static void allwinner_h3_init(Object *obj)
s->memmap = allwinner_h3_memmap;
for (int i = 0; i < AW_H3_NUM_CPUS; i++) {
- object_initialize_child(obj, "cpu[*]", &s->cpus[i], sizeof(s->cpus[i]),
- ARM_CPU_TYPE_NAME("cortex-a7"),
- &error_abort, NULL);
+ object_initialize_child(obj, "cpu[*]", &s->cpus[i],
+ ARM_CPU_TYPE_NAME("cortex-a7"));
}
sysbus_init_child_obj(obj, "gic", &s->gic, sizeof(s->gic),
diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c
index 174ca7e..c903e72 100644
--- a/hw/arm/armsse.c
+++ b/hw/arm/armsse.c
@@ -251,9 +251,7 @@ static void armsse_init(Object *obj)
char *name;
name = g_strdup_printf("cluster%d", i);
- object_initialize_child(obj, name, &s->cluster[i],
- sizeof(s->cluster[i]), TYPE_CPU_CLUSTER,
- &error_abort, NULL);
+ object_initialize_child(obj, name, &s->cluster[i], TYPE_CPU_CLUSTER);
qdev_prop_set_uint32(DEVICE(&s->cluster[i]), "cluster-id", i);
g_free(name);
@@ -287,15 +285,13 @@ static void armsse_init(Object *obj)
g_free(name);
}
object_initialize_child(obj, "mpc-irq-orgate", &s->mpc_irq_orgate,
- sizeof(s->mpc_irq_orgate), TYPE_OR_IRQ,
- &error_abort, NULL);
+ TYPE_OR_IRQ);
for (i = 0; i < IOTS_NUM_EXP_MPC + info->sram_banks; i++) {
char *name = g_strdup_printf("mpc-irq-splitter-%d", i);
SplitIRQ *splitter = &s->mpc_irq_splitter[i];
- object_initialize_child(obj, name, splitter, sizeof(*splitter),
- TYPE_SPLIT_IRQ, &error_abort, NULL);
+ object_initialize_child(obj, name, splitter, TYPE_SPLIT_IRQ);
g_free(name);
}
sysbus_init_child_obj(obj, "timer0", &s->timer0, sizeof(s->timer0),
@@ -375,21 +371,16 @@ static void armsse_init(Object *obj)
g_free(name);
}
}
- object_initialize_child(obj, "nmi-orgate", &s->nmi_orgate,
- sizeof(s->nmi_orgate), TYPE_OR_IRQ,
- &error_abort, NULL);
+ object_initialize_child(obj, "nmi-orgate", &s->nmi_orgate, TYPE_OR_IRQ);
object_initialize_child(obj, "ppc-irq-orgate", &s->ppc_irq_orgate,
- sizeof(s->ppc_irq_orgate), TYPE_OR_IRQ,
- &error_abort, NULL);
+ TYPE_OR_IRQ);
object_initialize_child(obj, "sec-resp-splitter", &s->sec_resp_splitter,
- sizeof(s->sec_resp_splitter), TYPE_SPLIT_IRQ,
- &error_abort, NULL);
+ TYPE_SPLIT_IRQ);
for (i = 0; i < ARRAY_SIZE(s->ppc_irq_splitter); i++) {
char *name = g_strdup_printf("ppc-irq-splitter-%d", i);
SplitIRQ *splitter = &s->ppc_irq_splitter[i];
- object_initialize_child(obj, name, splitter, sizeof(*splitter),
- TYPE_SPLIT_IRQ, &error_abort, NULL);
+ object_initialize_child(obj, name, splitter, TYPE_SPLIT_IRQ);
g_free(name);
}
if (info->num_cpus > 1) {
@@ -398,8 +389,7 @@ static void armsse_init(Object *obj)
char *name = g_strdup_printf("cpu-irq-splitter%d", i);
SplitIRQ *splitter = &s->cpu_irq_splitter[i];
- object_initialize_child(obj, name, splitter, sizeof(*splitter),
- TYPE_SPLIT_IRQ, &error_abort, NULL);
+ object_initialize_child(obj, name, splitter, TYPE_SPLIT_IRQ);
g_free(name);
}
}
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index ee50476..46fe6fe 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -267,9 +267,7 @@ static void aspeed_machine_init(MachineState *machine)
4 * GiB);
memory_region_add_subregion(&bmc->ram_container, 0, machine->ram);
- object_initialize_child(OBJECT(machine), "soc", &bmc->soc,
- sizeof(bmc->soc), amc->soc_name, &error_abort,
- NULL);
+ object_initialize_child(OBJECT(machine), "soc", &bmc->soc, amc->soc_name);
sc = ASPEED_SOC_GET_CLASS(&bmc->soc);
diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
index b912d19..beb688f 100644
--- a/hw/arm/aspeed_ast2600.c
+++ b/hw/arm/aspeed_ast2600.c
@@ -127,9 +127,7 @@ static void aspeed_soc_ast2600_init(Object *obj)
}
for (i = 0; i < sc->num_cpus; i++) {
- object_initialize_child(obj, "cpu[*]", OBJECT(&s->cpu[i]),
- sizeof(s->cpu[i]), sc->cpu_type,
- &error_abort, NULL);
+ object_initialize_child(obj, "cpu[*]", &s->cpu[i], sc->cpu_type);
}
snprintf(typename, sizeof(typename), "aspeed.scu-%s", socname);
diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
index 3ec1257..18d1763 100644
--- a/hw/arm/aspeed_soc.c
+++ b/hw/arm/aspeed_soc.c
@@ -142,9 +142,7 @@ static void aspeed_soc_init(Object *obj)
}
for (i = 0; i < sc->num_cpus; i++) {
- object_initialize_child(obj, "cpu[*]", OBJECT(&s->cpu[i]),
- sizeof(s->cpu[i]), sc->cpu_type,
- &error_abort, NULL);
+ object_initialize_child(obj, "cpu[*]", &s->cpu[i], sc->cpu_type);
}
snprintf(typename, sizeof(typename), "aspeed.scu-%s", socname);
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
index e51b4e0..82cd1d2 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -53,8 +53,7 @@ static void bcm2836_init(Object *obj)
for (n = 0; n < BCM283X_NCPUS; n++) {
object_initialize_child(obj, "cpu[*]", &s->cpu[n].core,
- sizeof(s->cpu[n].core), info->cpu_type,
- &error_abort, NULL);
+ info->cpu_type);
}
sysbus_init_child_obj(obj, "control", &s->control, sizeof(s->control),
diff --git a/hw/arm/digic.c b/hw/arm/digic.c
index 22434a6..6153d5f 100644
--- a/hw/arm/digic.c
+++ b/hw/arm/digic.c
@@ -36,9 +36,7 @@ static void digic_init(Object *obj)
DigicState *s = DIGIC(obj);
int i;
- object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
- ARM_CPU_TYPE_NAME("arm946"),
- &error_abort, NULL);
+ object_initialize_child(obj, "cpu", &s->cpu, ARM_CPU_TYPE_NAME("arm946"));
for (i = 0; i < DIGIC4_NB_TIMERS; i++) {
#define DIGIC_TIMER_NAME_MLEN 11
diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c
index 9ff1a11..86cbd63 100644
--- a/hw/arm/exynos4210.c
+++ b/hw/arm/exynos4210.c
@@ -482,8 +482,7 @@ static void exynos4210_init(Object *obj)
char *name = g_strdup_printf("pl330-irq-orgate%d", i);
qemu_or_irq *orgate = &s->pl330_irq_orgate[i];
- object_initialize_child(obj, name, orgate, sizeof(*orgate),
- TYPE_OR_IRQ, &error_abort, NULL);
+ object_initialize_child(obj, name, orgate, TYPE_OR_IRQ);
g_free(name);
}
}
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index cdaa79c..d8340e3 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -38,9 +38,7 @@ static void fsl_imx25_init(Object *obj)
FslIMX25State *s = FSL_IMX25(obj);
int i;
- object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
- ARM_CPU_TYPE_NAME("arm926"),
- &error_abort, NULL);
+ object_initialize_child(obj, "cpu", &s->cpu, ARM_CPU_TYPE_NAME("arm926"));
sysbus_init_child_obj(obj, "avic", &s->avic, sizeof(s->avic),
TYPE_IMX_AVIC);
diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c
index 1e79598..54eec89 100644
--- a/hw/arm/fsl-imx31.c
+++ b/hw/arm/fsl-imx31.c
@@ -33,9 +33,7 @@ static void fsl_imx31_init(Object *obj)
FslIMX31State *s = FSL_IMX31(obj);
int i;
- object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
- ARM_CPU_TYPE_NAME("arm1136"),
- &error_abort, NULL);
+ object_initialize_child(obj, "cpu", &s->cpu, ARM_CPU_TYPE_NAME("arm1136"));
sysbus_init_child_obj(obj, "avic", &s->avic, sizeof(s->avic),
TYPE_IMX_AVIC);
diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
index f58c85a..88fbba8 100644
--- a/hw/arm/fsl-imx6.c
+++ b/hw/arm/fsl-imx6.c
@@ -43,9 +43,8 @@ static void fsl_imx6_init(Object *obj)
for (i = 0; i < MIN(ms->smp.cpus, FSL_IMX6_NUM_CPUS); i++) {
snprintf(name, NAME_SIZE, "cpu%d", i);
- object_initialize_child(obj, name, &s->cpu[i], sizeof(s->cpu[i]),
- ARM_CPU_TYPE_NAME("cortex-a9"),
- &error_abort, NULL);
+ object_initialize_child(obj, name, &s->cpu[i],
+ ARM_CPU_TYPE_NAME("cortex-a9"));
}
sysbus_init_child_obj(obj, "a9mpcore", &s->a9mpcore, sizeof(s->a9mpcore),
diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c
index 3ecb212..491f1b7 100644
--- a/hw/arm/fsl-imx6ul.c
+++ b/hw/arm/fsl-imx6ul.c
@@ -34,8 +34,8 @@ static void fsl_imx6ul_init(Object *obj)
char name[NAME_SIZE];
int i;
- object_initialize_child(obj, "cpu0", &s->cpu, sizeof(s->cpu),
- ARM_CPU_TYPE_NAME("cortex-a7"), &error_abort, NULL);
+ object_initialize_child(obj, "cpu0", &s->cpu,
+ ARM_CPU_TYPE_NAME("cortex-a7"));
/*
* A7MPCORE
diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c
index 89c3b64..5cf2b7a 100644
--- a/hw/arm/fsl-imx7.c
+++ b/hw/arm/fsl-imx7.c
@@ -38,9 +38,8 @@ static void fsl_imx7_init(Object *obj)
for (i = 0; i < MIN(ms->smp.cpus, FSL_IMX7_NUM_CPUS); i++) {
snprintf(name, NAME_SIZE, "cpu%d", i);
- object_initialize_child(obj, name, &s->cpu[i], sizeof(s->cpu[i]),
- ARM_CPU_TYPE_NAME("cortex-a7"), &error_abort,
- NULL);
+ object_initialize_child(obj, name, &s->cpu[i],
+ ARM_CPU_TYPE_NAME("cortex-a7"));
}
/*
diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c
index 75076f2..69b9571 100644
--- a/hw/arm/imx25_pdk.c
+++ b/hw/arm/imx25_pdk.c
@@ -73,8 +73,7 @@ static void imx25_pdk_init(MachineState *machine)
unsigned int alias_offset;
int i;
- object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc),
- TYPE_FSL_IMX25, &error_abort, NULL);
+ object_initialize_child(OBJECT(machine), "soc", &s->soc, TYPE_FSL_IMX25);
object_property_set_bool(OBJECT(&s->soc), true, "realized", &error_fatal);
diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c
index 34f6bcb..0275d63 100644
--- a/hw/arm/kzm.c
+++ b/hw/arm/kzm.c
@@ -71,8 +71,7 @@ static void kzm_init(MachineState *machine)
unsigned int alias_offset;
unsigned int i;
- object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc),
- TYPE_FSL_IMX31, &error_abort, NULL);
+ object_initialize_child(OBJECT(machine), "soc", &s->soc, TYPE_FSL_IMX31);
object_property_set_bool(OBJECT(&s->soc), true, "realized", &error_fatal);
diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
index 07d11e4..8a05022 100644
--- a/hw/arm/mps2-tz.c
+++ b/hw/arm/mps2-tz.c
@@ -414,9 +414,10 @@ static void mps2tz_common_init(MachineState *machine)
char *name = g_strdup_printf("mps2-irq-splitter%d", i);
SplitIRQ *splitter = &mms->cpu_irq_splitter[i];
- object_initialize_child(OBJECT(machine), name,
- splitter, sizeof(*splitter),
- TYPE_SPLIT_IRQ, &error_fatal, NULL);
+ object_initialize_child_with_props(OBJECT(machine), name,
+ splitter, sizeof(*splitter),
+ TYPE_SPLIT_IRQ, &error_fatal,
+ NULL);
g_free(name);
object_property_set_int(OBJECT(splitter), 2, "num-lines",
@@ -436,9 +437,7 @@ static void mps2tz_common_init(MachineState *machine)
* lines, one for each of the PPCs we create here, plus one per MSC.
*/
object_initialize_child(OBJECT(machine), "sec-resp-splitter",
- &mms->sec_resp_splitter,
- sizeof(mms->sec_resp_splitter),
- TYPE_SPLIT_IRQ, &error_abort, NULL);
+ &mms->sec_resp_splitter, TYPE_SPLIT_IRQ);
object_property_set_int(OBJECT(&mms->sec_resp_splitter),
ARRAY_SIZE(mms->ppc) + ARRAY_SIZE(mms->msc),
"num-lines", &error_fatal);
@@ -472,8 +471,7 @@ static void mps2tz_common_init(MachineState *machine)
* Create the OR gate for this.
*/
object_initialize_child(OBJECT(mms), "uart-irq-orgate",
- &mms->uart_irq_orgate, sizeof(mms->uart_irq_orgate),
- TYPE_OR_IRQ, &error_abort, NULL);
+ &mms->uart_irq_orgate, TYPE_OR_IRQ);
object_property_set_int(OBJECT(&mms->uart_irq_orgate), 10, "num-lines",
&error_fatal);
object_property_set_bool(OBJECT(&mms->uart_irq_orgate), true,
diff --git a/hw/arm/musca.c b/hw/arm/musca.c
index ba99dd1..cd7df7c 100644
--- a/hw/arm/musca.c
+++ b/hw/arm/musca.c
@@ -404,9 +404,9 @@ static void musca_init(MachineState *machine)
char *name = g_strdup_printf("musca-irq-splitter%d", i);
SplitIRQ *splitter = &mms->cpu_irq_splitter[i];
- object_initialize_child(OBJECT(machine), name,
- splitter, sizeof(*splitter),
- TYPE_SPLIT_IRQ, &error_fatal, NULL);
+ object_initialize_child_with_props(OBJECT(machine), name, splitter,
+ sizeof(*splitter), TYPE_SPLIT_IRQ,
+ &error_fatal, NULL);
g_free(name);
object_property_set_int(OBJECT(splitter), 2, "num-lines",
@@ -424,10 +424,10 @@ static void musca_init(MachineState *machine)
* The sec_resp_cfg output from the SSE-200 must be split into multiple
* lines, one for each of the PPCs we create here.
*/
- object_initialize_child(OBJECT(machine), "sec-resp-splitter",
- &mms->sec_resp_splitter,
- sizeof(mms->sec_resp_splitter),
- TYPE_SPLIT_IRQ, &error_fatal, NULL);
+ object_initialize_child_with_props(OBJECT(machine), "sec-resp-splitter",
+ &mms->sec_resp_splitter,
+ sizeof(mms->sec_resp_splitter),
+ TYPE_SPLIT_IRQ, &error_fatal, NULL);
object_property_set_int(OBJECT(&mms->sec_resp_splitter),
ARRAY_SIZE(mms->ppc), "num-lines", &error_fatal);
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index a8e26a7..78cb995 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -282,8 +282,8 @@ static void raspi_machine_init(MachineState *machine)
machine->ram, 0);
/* Setup the SOC */
- object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc),
- board_soc_type(board_rev), &error_abort, NULL);
+ object_initialize_child(OBJECT(machine), "soc", &s->soc,
+ board_soc_type(board_rev));
object_property_add_const_link(OBJECT(&s->soc), "ram", OBJECT(machine->ram));
object_property_set_int(OBJECT(&s->soc), board_rev, "board-rev",
&error_abort);
diff --git a/hw/arm/stm32f405_soc.c b/hw/arm/stm32f405_soc.c
index c9a530e..33a83bd 100644
--- a/hw/arm/stm32f405_soc.c
+++ b/hw/arm/stm32f405_soc.c
@@ -169,9 +169,9 @@ static void stm32f405_soc_realize(DeviceState *dev_soc, Error **errp)
}
/* ADC device, the IRQs are ORed together */
- object_initialize_child(OBJECT(s), "adc-orirq", &s->adc_irqs,
- sizeof(s->adc_irqs), TYPE_OR_IRQ,
- &err, NULL);
+ object_initialize_child_with_props(OBJECT(s), "adc-orirq", &s->adc_irqs,
+ sizeof(s->adc_irqs), TYPE_OR_IRQ, &err,
+ NULL);
if (err != NULL) {
error_propagate(errp, err);
return;
diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c
index c3d47bb..12e4469 100644
--- a/hw/arm/xlnx-versal.c
+++ b/hw/arm/xlnx-versal.c
@@ -32,9 +32,8 @@ static void versal_create_apu_cpus(Versal *s)
for (i = 0; i < ARRAY_SIZE(s->fpd.apu.cpu); i++) {
Object *obj;
- object_initialize_child(OBJECT(s), "apu-cpu[*]",
- &s->fpd.apu.cpu[i], sizeof(s->fpd.apu.cpu[i]),
- XLNX_VERSAL_ACPU_TYPE, &error_abort, NULL);
+ object_initialize_child(OBJECT(s), "apu-cpu[*]", &s->fpd.apu.cpu[i],
+ XLNX_VERSAL_ACPU_TYPE);
obj = OBJECT(&s->fpd.apu.cpu[i]);
object_property_set_int(obj, s->cfg.psci_conduit,
"psci-conduit", &error_abort);
diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c
index 77c84b8..822e24a 100644
--- a/hw/arm/xlnx-zcu102.c
+++ b/hw/arm/xlnx-zcu102.c
@@ -116,8 +116,7 @@ static void xlnx_zcu102_init(MachineState *machine)
ram_size);
}
- object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc),
- TYPE_XLNX_ZYNQMP, &error_abort, NULL);
+ object_initialize_child(OBJECT(machine), "soc", &s->soc, TYPE_XLNX_ZYNQMP);
object_property_set_link(OBJECT(&s->soc), OBJECT(machine->ram),
"ddr-ram", &error_abort);
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index f08abf6..890139d 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -187,17 +187,15 @@ static void xlnx_zynqmp_create_rpu(MachineState *ms, XlnxZynqMPState *s,
}
object_initialize_child(OBJECT(s), "rpu-cluster", &s->rpu_cluster,
- sizeof(s->rpu_cluster), TYPE_CPU_CLUSTER,
- &error_abort, NULL);
+ TYPE_CPU_CLUSTER);
qdev_prop_set_uint32(DEVICE(&s->rpu_cluster), "cluster-id", 1);
for (i = 0; i < num_rpus; i++) {
char *name;
object_initialize_child(OBJECT(&s->rpu_cluster), "rpu-cpu[*]",
- &s->rpu_cpu[i], sizeof(s->rpu_cpu[i]),
- ARM_CPU_TYPE_NAME("cortex-r5f"),
- &error_abort, NULL);
+ &s->rpu_cpu[i],
+ ARM_CPU_TYPE_NAME("cortex-r5f"));
name = object_get_canonical_path_component(OBJECT(&s->rpu_cpu[i]));
if (strcmp(name, boot_cpu)) {
@@ -230,15 +228,13 @@ static void xlnx_zynqmp_init(Object *obj)
int num_apus = MIN(ms->smp.cpus, XLNX_ZYNQMP_NUM_APU_CPUS);
object_initialize_child(obj, "apu-cluster", &s->apu_cluster,
- sizeof(s->apu_cluster), TYPE_CPU_CLUSTER,
- &error_abort, NULL);
+ TYPE_CPU_CLUSTER);
qdev_prop_set_uint32(DEVICE(&s->apu_cluster), "cluster-id", 0);
for (i = 0; i < num_apus; i++) {
object_initialize_child(OBJECT(&s->apu_cluster), "apu-cpu[*]",
- &s->apu_cpu[i], sizeof(s->apu_cpu[i]),
- ARM_CPU_TYPE_NAME("cortex-a53"),
- &error_abort, NULL);
+ &s->apu_cpu[i],
+ ARM_CPU_TYPE_NAME("cortex-a53"));
}
sysbus_init_child_obj(obj, "gic", &s->gic, sizeof(s->gic),