diff options
author | Igor Mammedov <imammedo@redhat.com> | 2017-08-24 18:31:46 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2017-09-01 11:54:25 -0300 |
commit | f6f8b2609564b027fdf7803edc45de7bc55e4833 (patch) | |
tree | 92c420c88574cf34bf0b564046cf4442a308f3b4 | |
parent | a328ad964774ce3043dade8c9870139f127a3372 (diff) | |
download | qemu-f6f8b2609564b027fdf7803edc45de7bc55e4833.zip qemu-f6f8b2609564b027fdf7803edc45de7bc55e4833.tar.gz qemu-f6f8b2609564b027fdf7803edc45de7bc55e4833.tar.bz2 |
openrisc: replace cpu_openrisc_init() with cpu_generic_init()
it's just a wrapper, drop it and use cpu_generic_init() directly
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1503592308-93913-24-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r-- | hw/openrisc/openrisc_sim.c | 2 | ||||
-rw-r--r-- | target/openrisc/cpu.c | 5 | ||||
-rw-r--r-- | target/openrisc/cpu.h | 4 |
3 files changed, 2 insertions, 9 deletions
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index e1eeffc..243d802 100644 --- a/hw/openrisc/openrisc_sim.c +++ b/hw/openrisc/openrisc_sim.c @@ -109,7 +109,7 @@ static void openrisc_sim_init(MachineState *machine) } for (n = 0; n < smp_cpus; n++) { - cpu = cpu_openrisc_init(cpu_model); + cpu = OPENRISC_CPU(cpu_generic_init(TYPE_OPENRISC_CPU, cpu_model)); if (cpu == NULL) { fprintf(stderr, "Unable to find CPU definition!\n"); exit(1); diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index 1d6330c..a979f0b 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -210,11 +210,6 @@ static void openrisc_cpu_register_types(void) } } -OpenRISCCPU *cpu_openrisc_init(const char *cpu_model) -{ - return OPENRISC_CPU(cpu_generic_init(TYPE_OPENRISC_CPU, cpu_model)); -} - /* Sort alphabetically by type name, except for "any". */ static gint openrisc_cpu_list_compare(gconstpointer a, gconstpointer b) { diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index 2721432..f51b89a 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -347,8 +347,6 @@ static inline OpenRISCCPU *openrisc_env_get_cpu(CPUOpenRISCState *env) #define ENV_OFFSET offsetof(OpenRISCCPU, env) -OpenRISCCPU *cpu_openrisc_init(const char *cpu_model); - void cpu_openrisc_list(FILE *f, fprintf_function cpu_fprintf); void openrisc_cpu_do_interrupt(CPUState *cpu); bool openrisc_cpu_exec_interrupt(CPUState *cpu, int int_req); @@ -390,7 +388,7 @@ int cpu_openrisc_get_phys_data(OpenRISCCPU *cpu, int *prot, target_ulong address, int rw); #endif -#define cpu_init(cpu_model) CPU(cpu_openrisc_init(cpu_model)) +#define cpu_init(cpu_model) cpu_generic_init(TYPE_OPENRISC_CPU, cpu_model) #include "exec/cpu-all.h" |