aboutsummaryrefslogtreecommitdiff
path: root/target/arm/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/arm/cpu.c')
-rw-r--r--target/arm/cpu.c41
1 files changed, 14 insertions, 27 deletions
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 64cd0a7d73..06907b36d7 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1104,26 +1104,22 @@ void arm_cpu_post_init(Object *obj)
if (arm_feature(&cpu->env, ARM_FEATURE_CBAR) ||
arm_feature(&cpu->env, ARM_FEATURE_CBAR_RO)) {
- qdev_property_add_static(DEVICE(obj), &arm_cpu_reset_cbar_property,
- &error_abort);
+ qdev_property_add_static(DEVICE(obj), &arm_cpu_reset_cbar_property);
}
if (!arm_feature(&cpu->env, ARM_FEATURE_M)) {
- qdev_property_add_static(DEVICE(obj), &arm_cpu_reset_hivecs_property,
- &error_abort);
+ qdev_property_add_static(DEVICE(obj), &arm_cpu_reset_hivecs_property);
}
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
- qdev_property_add_static(DEVICE(obj), &arm_cpu_rvbar_property,
- &error_abort);
+ qdev_property_add_static(DEVICE(obj), &arm_cpu_rvbar_property);
}
if (arm_feature(&cpu->env, ARM_FEATURE_EL3)) {
/* Add the has_el3 state CPU property only if EL3 is allowed. This will
* prevent "has_el3" from existing on CPUs which cannot support EL3.
*/
- qdev_property_add_static(DEVICE(obj), &arm_cpu_has_el3_property,
- &error_abort);
+ qdev_property_add_static(DEVICE(obj), &arm_cpu_has_el3_property);
#ifndef CONFIG_USER_ONLY
object_property_add_link(obj, "secure-memory",
@@ -1136,8 +1132,7 @@ void arm_cpu_post_init(Object *obj)
}
if (arm_feature(&cpu->env, ARM_FEATURE_EL2)) {
- qdev_property_add_static(DEVICE(obj), &arm_cpu_has_el2_property,
- &error_abort);
+ qdev_property_add_static(DEVICE(obj), &arm_cpu_has_el2_property);
}
if (arm_feature(&cpu->env, ARM_FEATURE_PMU)) {
@@ -1154,32 +1149,27 @@ void arm_cpu_post_init(Object *obj)
if (arm_feature(&cpu->env, ARM_FEATURE_VFP)) {
cpu->has_vfp = true;
if (!kvm_enabled()) {
- qdev_property_add_static(DEVICE(obj), &arm_cpu_has_vfp_property,
- &error_abort);
+ qdev_property_add_static(DEVICE(obj), &arm_cpu_has_vfp_property);
}
}
if (arm_feature(&cpu->env, ARM_FEATURE_NEON)) {
cpu->has_neon = true;
if (!kvm_enabled()) {
- qdev_property_add_static(DEVICE(obj), &arm_cpu_has_neon_property,
- &error_abort);
+ qdev_property_add_static(DEVICE(obj), &arm_cpu_has_neon_property);
}
}
if (arm_feature(&cpu->env, ARM_FEATURE_M) &&
arm_feature(&cpu->env, ARM_FEATURE_THUMB_DSP)) {
- qdev_property_add_static(DEVICE(obj), &arm_cpu_has_dsp_property,
- &error_abort);
+ qdev_property_add_static(DEVICE(obj), &arm_cpu_has_dsp_property);
}
if (arm_feature(&cpu->env, ARM_FEATURE_PMSA)) {
- qdev_property_add_static(DEVICE(obj), &arm_cpu_has_mpu_property,
- &error_abort);
+ qdev_property_add_static(DEVICE(obj), &arm_cpu_has_mpu_property);
if (arm_feature(&cpu->env, ARM_FEATURE_V7)) {
qdev_property_add_static(DEVICE(obj),
- &arm_cpu_pmsav7_dregion_property,
- &error_abort);
+ &arm_cpu_pmsav7_dregion_property);
}
}
@@ -1198,12 +1188,10 @@ void arm_cpu_post_init(Object *obj)
NULL, NULL, &error_abort);
}
- qdev_property_add_static(DEVICE(obj), &arm_cpu_cfgend_property,
- &error_abort);
+ qdev_property_add_static(DEVICE(obj), &arm_cpu_cfgend_property);
if (arm_feature(&cpu->env, ARM_FEATURE_GENERIC_TIMER)) {
- qdev_property_add_static(DEVICE(cpu), &arm_cpu_gt_cntfrq_property,
- &error_abort);
+ qdev_property_add_static(DEVICE(cpu), &arm_cpu_gt_cntfrq_property);
}
}
@@ -2706,10 +2694,9 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
device_class_set_parent_realize(dc, arm_cpu_realizefn,
&acc->parent_realize);
- dc->props = arm_cpu_properties;
- acc->parent_reset = cc->reset;
- cc->reset = arm_cpu_reset;
+ device_class_set_props(dc, arm_cpu_properties);
+ cpu_class_set_parent_reset(cc, arm_cpu_reset, &acc->parent_reset);
cc->class_by_name = arm_cpu_class_by_name;
cc->has_work = arm_cpu_has_work;