aboutsummaryrefslogtreecommitdiff
path: root/hw/core/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core/cpu.c')
-rw-r--r--hw/core/cpu.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/core/cpu.c b/hw/core/cpu.c
index db1a03c6bb..fe65ca62ac 100644
--- a/hw/core/cpu.c
+++ b/hw/core/cpu.c
@@ -239,6 +239,14 @@ void cpu_dump_statistics(CPUState *cpu, int flags)
}
}
+void cpu_class_set_parent_reset(CPUClass *cc,
+ void (*child_reset)(CPUState *cpu),
+ void (**parent_reset)(CPUState *cpu))
+{
+ *parent_reset = cc->reset;
+ cc->reset = child_reset;
+}
+
void cpu_reset(CPUState *cpu)
{
CPUClass *klass = CPU_GET_CLASS(cpu);
@@ -432,7 +440,7 @@ static void cpu_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_CPU, dc->categories);
dc->realize = cpu_common_realizefn;
dc->unrealize = cpu_common_unrealizefn;
- dc->props = cpu_common_props;
+ device_class_set_props(dc, cpu_common_props);
/*
* Reason: CPUs still need special care by board code: wiring up
* IRQs, adding reset handlers, halting non-first CPUs, ...