summaryrefslogtreecommitdiff
path: root/target/nios2/cpu.h
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-08-24 18:31:36 +0200
committerEduardo Habkost <ehabkost@redhat.com>2017-09-01 11:54:24 -0300
commitda9cbe02bc0a0c4ee8148da6238eb7bbd61f17f3 (patch)
tree4d4e3d6b0d8209a689809660ec343cbceb4d7af1 /target/nios2/cpu.h
parent98aca243633014c86ab8de3a5b29ae7d024e7ef5 (diff)
downloadqemu-da9cbe02bc0a0c4ee8148da6238eb7bbd61f17f3.zip
nios2: replace cpu_nios2_init() with cpu_generic_init()
cpu_nios2_init() always falls back to TYPE_NIOS2_CPU object regardless of cpu_model. Put fallback logic into nios2_cpu_class_by_name() which would translate any cpu_model into TYPE_NIOS2_CPU class and replace cpu_nios2_init() with cpu_generic_init() Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1503592308-93913-14-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target/nios2/cpu.h')
-rw-r--r--target/nios2/cpu.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h
index 13931f3f0b..50d803a217 100644
--- a/target/nios2/cpu.h
+++ b/target/nios2/cpu.h
@@ -212,7 +212,6 @@ static inline Nios2CPU *nios2_env_get_cpu(CPUNios2State *env)
#define ENV_OFFSET offsetof(Nios2CPU, env)
void nios2_tcg_init(void);
-Nios2CPU *cpu_nios2_init(const char *cpu_model);
void nios2_cpu_do_interrupt(CPUState *cs);
int cpu_nios2_signal_handler(int host_signum, void *pinfo, void *puc);
void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUNios2State *env);
@@ -229,7 +228,7 @@ void nios2_check_interrupts(CPUNios2State *env);
#define TARGET_PHYS_ADDR_SPACE_BITS 32
#define TARGET_VIRT_ADDR_SPACE_BITS 32
-#define cpu_init(cpu_model) CPU(cpu_nios2_init(cpu_model))
+#define cpu_init(cpu_model) cpu_generic_init(TYPE_NIOS2_CPU, cpu_model)
#define cpu_gen_code cpu_nios2_gen_code
#define cpu_signal_handler cpu_nios2_signal_handler