aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/e500.c4
-rw-r--r--hw/ppc/pnv.c40
-rw-r--r--hw/ppc/pnv_core.c3
-rw-r--r--hw/ppc/pnv_psi.c11
-rw-r--r--hw/ppc/spapr_caps.c12
-rw-r--r--hw/ppc/spapr_drc.c9
-rw-r--r--hw/ppc/spapr_irq.c4
7 files changed, 25 insertions, 58 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 97fa970e72..5448d101d9 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -764,15 +764,13 @@ static DeviceState *ppce500_init_mpic_qemu(PPCE500MachineState *pms,
static DeviceState *ppce500_init_mpic_kvm(const PPCE500MachineClass *pmc,
IrqLines *irqs, Error **errp)
{
- Error *err = NULL;
DeviceState *dev;
CPUState *cs;
dev = qdev_new(TYPE_KVM_OPENPIC);
qdev_prop_set_uint32(dev, "model", pmc->mpic_version);
- if (!sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &err)) {
- error_propagate(errp, err);
+ if (!sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), errp)) {
object_unparent(OBJECT(dev));
return NULL;
}
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 194b457917..6670967e26 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -1140,8 +1140,7 @@ static void pnv_chip_power8_realize(DeviceState *dev, Error **errp)
&error_fatal);
object_property_set_link(OBJECT(&chip8->psi), ICS_PROP_XICS,
OBJECT(chip8->xics), &error_abort);
- if (!qdev_realize(DEVICE(&chip8->psi), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(&chip8->psi), NULL, errp)) {
return;
}
pnv_xscom_add_subregion(chip, PNV_XSCOM_PSIHB_BASE,
@@ -1170,8 +1169,7 @@ static void pnv_chip_power8_realize(DeviceState *dev, Error **errp)
/* Create the simplified OCC model */
object_property_set_link(OBJECT(&chip8->occ), "psi", OBJECT(&chip8->psi),
&error_abort);
- if (!qdev_realize(DEVICE(&chip8->occ), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(&chip8->occ), NULL, errp)) {
return;
}
pnv_xscom_add_subregion(chip, PNV_XSCOM_OCC_BASE, &chip8->occ.xscom_regs);
@@ -1183,8 +1181,7 @@ static void pnv_chip_power8_realize(DeviceState *dev, Error **errp)
/* HOMER */
object_property_set_link(OBJECT(&chip8->homer), "chip", OBJECT(chip),
&error_abort);
- if (!qdev_realize(DEVICE(&chip8->homer), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(&chip8->homer), NULL, errp)) {
return;
}
/* Homer Xscom region */
@@ -1202,8 +1199,7 @@ static void pnv_chip_power8_realize(DeviceState *dev, Error **errp)
object_property_set_int(OBJECT(phb), "index", i, &error_fatal);
object_property_set_int(OBJECT(phb), "chip-id", chip->chip_id,
&error_fatal);
- if (!sysbus_realize(SYS_BUS_DEVICE(phb), &local_err)) {
- error_propagate(errp, local_err);
+ if (!sysbus_realize(SYS_BUS_DEVICE(phb), errp)) {
return;
}
@@ -1358,7 +1354,6 @@ static void pnv_chip_quad_realize(Pnv9Chip *chip9, Error **errp)
static void pnv_chip_power9_phb_realize(PnvChip *chip, Error **errp)
{
Pnv9Chip *chip9 = PNV9_CHIP(chip);
- Error *local_err = NULL;
int i, j;
int phb_id = 0;
@@ -1380,8 +1375,7 @@ static void pnv_chip_power9_phb_realize(PnvChip *chip, Error **errp)
&error_fatal);
object_property_set_link(OBJECT(pec), "system-memory",
OBJECT(get_system_memory()), &error_abort);
- if (!qdev_realize(DEVICE(pec), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(pec), NULL, errp)) {
return;
}
@@ -1405,8 +1399,7 @@ static void pnv_chip_power9_phb_realize(PnvChip *chip, Error **errp)
&error_fatal);
object_property_set_link(obj, "stack", OBJECT(stack),
&error_abort);
- if (!sysbus_realize(SYS_BUS_DEVICE(obj), &local_err)) {
- error_propagate(errp, local_err);
+ if (!sysbus_realize(SYS_BUS_DEVICE(obj), errp)) {
return;
}
@@ -1464,8 +1457,7 @@ static void pnv_chip_power9_realize(DeviceState *dev, Error **errp)
PNV9_XIVE_TM_BASE(chip), &error_fatal);
object_property_set_link(OBJECT(&chip9->xive), "chip", OBJECT(chip),
&error_abort);
- if (!sysbus_realize(SYS_BUS_DEVICE(&chip9->xive), &local_err)) {
- error_propagate(errp, local_err);
+ if (!sysbus_realize(SYS_BUS_DEVICE(&chip9->xive), errp)) {
return;
}
pnv_xscom_add_subregion(chip, PNV9_XSCOM_XIVE_BASE,
@@ -1474,8 +1466,7 @@ static void pnv_chip_power9_realize(DeviceState *dev, Error **errp)
/* Processor Service Interface (PSI) Host Bridge */
object_property_set_int(OBJECT(&chip9->psi), "bar", PNV9_PSIHB_BASE(chip),
&error_fatal);
- if (!qdev_realize(DEVICE(&chip9->psi), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(&chip9->psi), NULL, errp)) {
return;
}
pnv_xscom_add_subregion(chip, PNV9_XSCOM_PSIHB_BASE,
@@ -1484,8 +1475,7 @@ static void pnv_chip_power9_realize(DeviceState *dev, Error **errp)
/* LPC */
object_property_set_link(OBJECT(&chip9->lpc), "psi", OBJECT(&chip9->psi),
&error_abort);
- if (!qdev_realize(DEVICE(&chip9->lpc), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(&chip9->lpc), NULL, errp)) {
return;
}
memory_region_add_subregion(get_system_memory(), PNV9_LPCM_BASE(chip),
@@ -1497,8 +1487,7 @@ static void pnv_chip_power9_realize(DeviceState *dev, Error **errp)
/* Create the simplified OCC model */
object_property_set_link(OBJECT(&chip9->occ), "psi", OBJECT(&chip9->psi),
&error_abort);
- if (!qdev_realize(DEVICE(&chip9->occ), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(&chip9->occ), NULL, errp)) {
return;
}
pnv_xscom_add_subregion(chip, PNV9_XSCOM_OCC_BASE, &chip9->occ.xscom_regs);
@@ -1510,8 +1499,7 @@ static void pnv_chip_power9_realize(DeviceState *dev, Error **errp)
/* HOMER */
object_property_set_link(OBJECT(&chip9->homer), "chip", OBJECT(chip),
&error_abort);
- if (!qdev_realize(DEVICE(&chip9->homer), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(&chip9->homer), NULL, errp)) {
return;
}
/* Homer Xscom region */
@@ -1591,8 +1579,7 @@ static void pnv_chip_power10_realize(DeviceState *dev, Error **errp)
/* Processor Service Interface (PSI) Host Bridge */
object_property_set_int(OBJECT(&chip10->psi), "bar",
PNV10_PSIHB_BASE(chip), &error_fatal);
- if (!qdev_realize(DEVICE(&chip10->psi), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(&chip10->psi), NULL, errp)) {
return;
}
pnv_xscom_add_subregion(chip, PNV10_XSCOM_PSIHB_BASE,
@@ -1601,8 +1588,7 @@ static void pnv_chip_power10_realize(DeviceState *dev, Error **errp)
/* LPC */
object_property_set_link(OBJECT(&chip10->lpc), "psi",
OBJECT(&chip10->psi), &error_abort);
- if (!qdev_realize(DEVICE(&chip10->lpc), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(&chip10->lpc), NULL, errp)) {
return;
}
memory_region_add_subregion(get_system_memory(), PNV10_LPCM_BASE(chip),
diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
index d699f077ad..4724ddf96c 100644
--- a/hw/ppc/pnv_core.c
+++ b/hw/ppc/pnv_core.c
@@ -173,8 +173,7 @@ static void pnv_core_cpu_realize(PnvCore *pc, PowerPCCPU *cpu, Error **errp)
Error *local_err = NULL;
PnvChipClass *pcc = PNV_CHIP_GET_CLASS(pc->chip);
- if (!qdev_realize(DEVICE(cpu), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(cpu), NULL, errp)) {
return;
}
diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
index 604788a8eb..5bdeec700e 100644
--- a/hw/ppc/pnv_psi.c
+++ b/hw/ppc/pnv_psi.c
@@ -501,17 +501,14 @@ static void pnv_psi_power8_realize(DeviceState *dev, Error **errp)
{
PnvPsi *psi = PNV_PSI(dev);
ICSState *ics = &PNV8_PSI(psi)->ics;
- Error *err = NULL;
unsigned int i;
/* Create PSI interrupt control source */
if (!object_property_set_int(OBJECT(ics), "nr-irqs", PSI_NUM_INTERRUPTS,
- &err)) {
- error_propagate(errp, err);
+ errp)) {
return;
}
- if (!qdev_realize(DEVICE(ics), NULL, &err)) {
- error_propagate(errp, err);
+ if (!qdev_realize(DEVICE(ics), NULL, errp)) {
return;
}
@@ -841,7 +838,6 @@ static void pnv_psi_power9_realize(DeviceState *dev, Error **errp)
{
PnvPsi *psi = PNV_PSI(dev);
XiveSource *xsrc = &PNV9_PSI(psi)->source;
- Error *local_err = NULL;
int i;
/* This is the only device with 4k ESB pages */
@@ -849,8 +845,7 @@ static void pnv_psi_power9_realize(DeviceState *dev, Error **errp)
object_property_set_int(OBJECT(xsrc), "nr-irqs", PSIHB9_NUM_IRQS,
&error_fatal);
object_property_set_link(OBJECT(xsrc), "xive", OBJECT(psi), &error_abort);
- if (!qdev_realize(DEVICE(xsrc), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(xsrc), NULL, errp)) {
return;
}
diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
index 52be86e49c..3225fc5a2e 100644
--- a/hw/ppc/spapr_caps.c
+++ b/hw/ppc/spapr_caps.c
@@ -86,10 +86,8 @@ static void spapr_cap_set_bool(Object *obj, Visitor *v, const char *name,
SpaprCapabilityInfo *cap = opaque;
SpaprMachineState *spapr = SPAPR_MACHINE(obj);
bool value;
- Error *local_err = NULL;
- if (!visit_type_bool(v, name, &value, &local_err)) {
- error_propagate(errp, local_err);
+ if (!visit_type_bool(v, name, &value, errp)) {
return;
}
@@ -122,12 +120,10 @@ static void spapr_cap_set_string(Object *obj, Visitor *v, const char *name,
{
SpaprCapabilityInfo *cap = opaque;
SpaprMachineState *spapr = SPAPR_MACHINE(obj);
- Error *local_err = NULL;
uint8_t i;
char *val;
- if (!visit_type_str(v, name, &val, &local_err)) {
- error_propagate(errp, local_err);
+ if (!visit_type_str(v, name, &val, errp)) {
return;
}
@@ -167,10 +163,8 @@ static void spapr_cap_set_pagesize(Object *obj, Visitor *v, const char *name,
SpaprMachineState *spapr = SPAPR_MACHINE(obj);
uint64_t pagesize;
uint8_t val;
- Error *local_err = NULL;
- if (!visit_type_size(v, name, &pagesize, &local_err)) {
- error_propagate(errp, local_err);
+ if (!visit_type_size(v, name, &pagesize, errp)) {
return;
}
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index 1f18b79348..43d12bc33a 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -327,8 +327,7 @@ static void prop_get_fdt(Object *obj, Visitor *v, const char *name,
case FDT_BEGIN_NODE:
fdt_depth++;
name = fdt_get_name(fdt, fdt_offset, &name_len);
- if (!visit_start_struct(v, name, NULL, 0, &err)) {
- error_propagate(errp, err);
+ if (!visit_start_struct(v, name, NULL, 0, errp)) {
return;
}
break;
@@ -347,14 +346,12 @@ static void prop_get_fdt(Object *obj, Visitor *v, const char *name,
int i;
prop = fdt_get_property_by_offset(fdt, fdt_offset, &prop_len);
name = fdt_string(fdt, fdt32_to_cpu(prop->nameoff));
- if (!visit_start_list(v, name, NULL, 0, &err)) {
- error_propagate(errp, err);
+ if (!visit_start_list(v, name, NULL, 0, errp)) {
return;
}
for (i = 0; i < prop_len; i++) {
if (!visit_type_uint8(v, NULL, (uint8_t *)&prop->data[i],
- &err)) {
- error_propagate(errp, err);
+ errp)) {
return;
}
}
diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c
index eb55171d70..2f8f7d62f8 100644
--- a/hw/ppc/spapr_irq.c
+++ b/hw/ppc/spapr_irq.c
@@ -302,7 +302,6 @@ void spapr_irq_init(SpaprMachineState *spapr, Error **errp)
spapr_irq_msi_init(spapr);
if (spapr->irq->xics) {
- Error *local_err = NULL;
Object *obj;
obj = object_new(TYPE_ICS_SPAPR);
@@ -311,8 +310,7 @@ void spapr_irq_init(SpaprMachineState *spapr, Error **errp)
object_property_set_link(obj, ICS_PROP_XICS, OBJECT(spapr),
&error_abort);
object_property_set_int(obj, "nr-irqs", smc->nr_xirqs, &error_abort);
- if (!qdev_realize(DEVICE(obj), NULL, &local_err)) {
- error_propagate(errp, local_err);
+ if (!qdev_realize(DEVICE(obj), NULL, errp)) {
return;
}