aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa/cpu.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-08-24 18:31:38 +0200
committerEduardo Habkost <ehabkost@redhat.com>2017-09-01 11:54:24 -0300
commit8e36271b9246a088007ee93ff065ea5db611f900 (patch)
tree9efa2aa825cc4f5a079f5a3e2fd448f57ea8a667 /target/xtensa/cpu.c
parent12f4572ec3acde40255328dad60fd8c03281c648 (diff)
downloadqemu-8e36271b9246a088007ee93ff065ea5db611f900.zip
qemu-8e36271b9246a088007ee93ff065ea5db611f900.tar.gz
qemu-8e36271b9246a088007ee93ff065ea5db611f900.tar.bz2
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 'target/xtensa/cpu.c')
-rw-r--r--target/xtensa/cpu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
index cd7f958..85897df 100644
--- a/target/xtensa/cpu.c
+++ b/target/xtensa/cpu.c
@@ -100,9 +100,12 @@ static ObjectClass *xtensa_cpu_class_by_name(const char *cpu_model)
static void xtensa_cpu_realizefn(DeviceState *dev, Error **errp)
{
CPUState *cs = CPU(dev);
+ XtensaCPU *cpu = XTENSA_CPU(dev);
XtensaCPUClass *xcc = XTENSA_CPU_GET_CLASS(dev);
Error *local_err = NULL;
+ xtensa_irq_init(&cpu->env);
+
cpu_exec_realizefn(cs, &local_err);
if (local_err != NULL) {
error_propagate(errp, local_err);