diff options
author | Igor Mammedov <imammedo@redhat.com> | 2017-10-05 15:50:59 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2017-10-27 16:04:27 +0200 |
commit | d58eeae393f58374a9c656a5d982665d8545068b (patch) | |
tree | 9267d6cf29c94e1f8e015c76fd13a1eecb033986 /hw/xtensa | |
parent | a5247d761c1ec6b01e7ddf4cdedcff59712f5504 (diff) |
xtensa: sim: use generic cpu_model parsing
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <1507211474-188400-26-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/xtensa')
-rw-r--r-- | hw/xtensa/sim.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c index b3580b11fa..2bb883b664 100644 --- a/hw/xtensa/sim.c +++ b/hw/xtensa/sim.c @@ -75,16 +75,11 @@ static void xtensa_sim_init(MachineState *machine) XtensaCPU *cpu = NULL; CPUXtensaState *env = NULL; ram_addr_t ram_size = machine->ram_size; - const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; int n; - if (!cpu_model) { - cpu_model = XTENSA_DEFAULT_CPU_MODEL; - } - for (n = 0; n < smp_cpus; n++) { - cpu = XTENSA_CPU(cpu_generic_init(TYPE_XTENSA_CPU, cpu_model)); + cpu = XTENSA_CPU(cpu_create(machine->cpu_type)); env = &cpu->env; env->sregs[PRID] = n; @@ -133,6 +128,7 @@ static void xtensa_sim_machine_init(MachineClass *mc) mc->init = xtensa_sim_init; mc->max_cpus = 4; mc->no_serial = 1; + mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE; } DEFINE_MACHINE("sim", xtensa_sim_machine_init) |