diff options
author | Igor Mammedov <imammedo@redhat.com> | 2017-09-20 16:49:34 -0300 |
---|---|---|
committer | Yongbok Kim <yongbok.kim@imgtec.com> | 2017-09-21 13:25:37 +0100 |
commit | c4c8146cfd0fc3f95418fbc82a2eded594675022 (patch) | |
tree | f4d6001cee7d57c14c0de49b9fa393fd95db4cc7 /target | |
parent | 41da212c9ce9482fcfd490170c2611470254f8dc (diff) | |
download | qemu-c4c8146cfd0fc3f95418fbc82a2eded594675022.zip qemu-c4c8146cfd0fc3f95418fbc82a2eded594675022.tar.gz qemu-c4c8146cfd0fc3f95418fbc82a2eded594675022.tar.bz2 |
mips: replace cpu_mips_init() with cpu_generic_init()
now cpu_mips_init() reimplements subset of cpu_generic_init()
tasks, so just drop it and use cpu_generic_init() directly.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
[PMD: use internal.h instead of cpu.h]
Tested-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/mips/cpu.h | 3 | ||||
-rw-r--r-- | target/mips/translate.c | 17 |
2 files changed, 1 insertions, 19 deletions
diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 2f81e0f..66265e4 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -737,10 +737,9 @@ enum { */ #define CPU_INTERRUPT_WAKE CPU_INTERRUPT_TGT_INT_0 -MIPSCPU *cpu_mips_init(const char *cpu_model); int cpu_mips_signal_handler(int host_signum, void *pinfo, void *puc); -#define cpu_init(cpu_model) CPU(cpu_mips_init(cpu_model)) +#define cpu_init(cpu_model) cpu_generic_init(TYPE_MIPS_CPU, cpu_model) bool cpu_supports_cps_smp(const char *cpu_model); bool cpu_supports_isa(const char *cpu_model, unsigned int isa); void cpu_set_exception_base(int vp_index, target_ulong address); diff --git a/target/mips/translate.c b/target/mips/translate.c index f7128bc..d16d879 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -20523,23 +20523,6 @@ void cpu_mips_realize_env(CPUMIPSState *env) mvp_init(env, env->cpu_model); } -MIPSCPU *cpu_mips_init(const char *cpu_model) -{ - ObjectClass *oc; - MIPSCPU *cpu; - - oc = cpu_class_by_name(TYPE_MIPS_CPU, cpu_model); - if (oc == NULL) { - return NULL; - } - - cpu = MIPS_CPU(object_new(object_class_get_name(oc))); - - object_property_set_bool(OBJECT(cpu), true, "realized", NULL); - - return cpu; -} - bool cpu_supports_cps_smp(const char *cpu_model) { const mips_def_t *def = cpu_mips_find_by_name(cpu_model); |