diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-16 04:19:35 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-02-16 14:50:57 +0100 |
commit | 5f6c964389ea5320e81e2fb8c2bc3aa40c5a8013 (patch) | |
tree | a2064dbeb9e720ff2d88c5c65bcca61a923b4b2b /target-xtensa/cpu.c | |
parent | 088383e3220776917f538d0e43933e842e16b804 (diff) |
target-xtensa: Introduce QOM realizefn for XtensaCPU
Introduce realizefn and set realized = true in cpu_xtensa_init().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-xtensa/cpu.c')
-rw-r--r-- | target-xtensa/cpu.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/target-xtensa/cpu.c b/target-xtensa/cpu.c index ebc7e9979b..d3706a30ac 100644 --- a/target-xtensa/cpu.c +++ b/target-xtensa/cpu.c @@ -57,6 +57,16 @@ static void xtensa_cpu_reset(CPUState *s) reset_mmu(env); } +static void xtensa_cpu_realizefn(DeviceState *dev, Error **errp) +{ + XtensaCPU *cpu = XTENSA_CPU(dev); + XtensaCPUClass *xcc = XTENSA_CPU_GET_CLASS(dev); + + qemu_init_vcpu(&cpu->env); + + xcc->parent_realize(dev, errp); +} + static void xtensa_cpu_initfn(Object *obj) { XtensaCPU *cpu = XTENSA_CPU(obj); @@ -76,6 +86,9 @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data) CPUClass *cc = CPU_CLASS(oc); XtensaCPUClass *xcc = XTENSA_CPU_CLASS(cc); + xcc->parent_realize = dc->realize; + dc->realize = xtensa_cpu_realizefn; + xcc->parent_reset = cc->reset; cc->reset = xtensa_cpu_reset; |