summaryrefslogtreecommitdiff
path: root/target-arm
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2014-03-04 03:17:10 +0100
committerAndreas Färber <afaerber@suse.de>2014-03-13 19:20:46 +0100
commit9262685b818512215f0829f0dc95c2363898a1ad (patch)
treea45bd8ce1dbcb4eaecbe6ad67af4f91d49c94f28 /target-arm
parent1590bbcb02921dfe8e3cf66e3a3aafd31193babf (diff)
downloadqemu-9262685b818512215f0829f0dc95c2363898a1ad.tar.gz
cpu: Factor out cpu_generic_init()
All targets using it gain the ability to set -cpu name,key=value,... options via the default TYPE_CPU CPUClass::parse_features() implementation. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/helper.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index a40f60fb22..f64be6f36d 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -2186,19 +2186,7 @@ void register_cp_regs_for_features(ARMCPU *cpu)
ARMCPU *cpu_arm_init(const char *cpu_model)
{
- ARMCPU *cpu;
- ObjectClass *oc;
-
- oc = cpu_class_by_name(TYPE_ARM_CPU, cpu_model);
- if (!oc) {
- return NULL;
- }
- cpu = ARM_CPU(object_new(object_class_get_name(oc)));
-
- /* TODO this should be set centrally, once possible */
- object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
-
- return cpu;
+ return ARM_CPU(cpu_generic_init(TYPE_ARM_CPU, cpu_model));
}
void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu)