diff options
author | Igor Mammedov <imammedo@redhat.com> | 2017-08-24 18:31:38 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2017-09-01 11:54:24 -0300 |
commit | 8e36271b9246a088007ee93ff065ea5db611f900 (patch) | |
tree | 9efa2aa825cc4f5a079f5a3e2fd448f57ea8a667 /hw/xtensa | |
parent | 12f4572ec3acde40255328dad60fd8c03281c648 (diff) |
xtensa: replace cpu_xtensa_init() with cpu_generic_init()
call xtensa_irq_init() at realize time which makes
cpu_xtensa_init() like generic cpu creation function.
As result we can replace it with cpu_generic_init()
which does the same job, reducing code duplication a bit.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <1503592308-93913-16-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 | 2 | ||||
-rw-r--r-- | hw/xtensa/xtfpga.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c index 249cd1e8c9..1b4767f58b 100644 --- a/hw/xtensa/sim.c +++ b/hw/xtensa/sim.c @@ -84,7 +84,7 @@ static void xtensa_sim_init(MachineState *machine) } for (n = 0; n < smp_cpus; n++) { - cpu = cpu_xtensa_init(cpu_model); + cpu = XTENSA_CPU(cpu_generic_init(TYPE_XTENSA_CPU, cpu_model)); if (cpu == NULL) { error_report("unable to find CPU definition '%s'", cpu_model); diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index 635a4d4ec3..182ec1e31c 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -232,7 +232,7 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine) } for (n = 0; n < smp_cpus; n++) { - cpu = cpu_xtensa_init(cpu_model); + cpu = XTENSA_CPU(cpu_generic_init(TYPE_XTENSA_CPU, cpu_model)); if (cpu == NULL) { error_report("unable to find CPU definition '%s'", cpu_model); |