summaryrefslogtreecommitdiffstats
path: root/target-cris/cpu.c
diff options
context:
space:
mode:
authorAndreas Färber2014-03-04 03:17:10 +0100
committerAndreas Färber2014-03-13 19:20:46 +0100
commit9262685b818512215f0829f0dc95c2363898a1ad (patch)
treea45bd8ce1dbcb4eaecbe6ad67af4f91d49c94f28 /target-cris/cpu.c
parentcpu: Implement CPUClass::parse_features() for the rest of CPUs (diff)
downloadqemu-9262685b818512215f0829f0dc95c2363898a1ad.tar.gz
qemu-9262685b818512215f0829f0dc95c2363898a1ad.tar.xz
qemu-9262685b818512215f0829f0dc95c2363898a1ad.zip
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-cris/cpu.c')
-rw-r--r--target-cris/cpu.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/target-cris/cpu.c b/target-cris/cpu.c
index 07da8450ea..12c90eef34 100644
--- a/target-cris/cpu.c
+++ b/target-cris/cpu.c
@@ -89,18 +89,7 @@ static ObjectClass *cris_cpu_class_by_name(const char *cpu_model)
CRISCPU *cpu_cris_init(const char *cpu_model)
{
- CRISCPU *cpu;
- ObjectClass *oc;
-
- oc = cris_cpu_class_by_name(cpu_model);
- if (oc == NULL) {
- return NULL;
- }
- cpu = CRIS_CPU(object_new(object_class_get_name(oc)));
-
- object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
-
- return cpu;
+ return CRIS_CPU(cpu_generic_init(TYPE_CRIS_CPU, cpu_model));
}
/* Sort alphabetically by VR. */