[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 7/8] target-s390x: Unregister reset callback on fina
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 7/8] target-s390x: Unregister reset callback on finalization |
Date: |
Fri, 18 Jan 2013 19:12:21 +0100 |
From: Andreas Färber <address@hidden>
Since commit "s390: Add CPU reset handler" the CPU's instance_init
registers a reset callback. Unregister that on instance_finalize.
Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-s390x/cpu.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index 6810246..0b68db8 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -126,6 +126,15 @@ static void s390_cpu_initfn(Object *obj)
cpu_reset(CPU(cpu));
}
+static void s390_cpu_finalize(Object *obj)
+{
+#if !defined(CONFIG_USER_ONLY)
+ S390CPU *cpu = S390_CPU(obj);
+
+ qemu_unregister_reset(s390_cpu_machine_reset_cb, cpu);
+#endif
+}
+
static void s390_cpu_class_init(ObjectClass *oc, void *data)
{
S390CPUClass *scc = S390_CPU_CLASS(oc);
@@ -140,6 +149,7 @@ static const TypeInfo s390_cpu_type_info = {
.parent = TYPE_CPU,
.instance_size = sizeof(S390CPU),
.instance_init = s390_cpu_initfn,
+ .instance_finalize = s390_cpu_finalize,
.abstract = false,
.class_size = sizeof(S390CPUClass),
.class_init = s390_cpu_class_init,
--
1.6.0.2
- [Qemu-devel] [PULL 0/8] s390 patch queue 2013-01-18, Alexander Graf, 2013/01/18
- [Qemu-devel] [PATCH 1/8] s390: new contributions GPLv2 or later, Alexander Graf, 2013/01/18
- [Qemu-devel] [PATCH 2/8] s390: Move IPL code into a separate device, Alexander Graf, 2013/01/18
- [Qemu-devel] [PATCH 6/8] s390x: fix indentation, Alexander Graf, 2013/01/18
- [Qemu-devel] [PATCH 3/8] S390: Enable -cpu help and QMP query-cpu-definitions, Alexander Graf, 2013/01/18
- [Qemu-devel] [PATCH 5/8] s390: Add CPU reset handler, Alexander Graf, 2013/01/18
- [Qemu-devel] [PATCH 7/8] target-s390x: Unregister reset callback on finalization,
Alexander Graf <=
- [Qemu-devel] [PATCH 4/8] s390x: Remove inline function ebcdic_put and related data from cpu.h, Alexander Graf, 2013/01/18
- [Qemu-devel] [PATCH 8/8] s390: Add a hypercall registration interface., Alexander Graf, 2013/01/18
- Re: [Qemu-devel] [PULL 0/8] s390 patch queue 2013-01-18, Blue Swirl, 2013/01/19