diff options
author | Greg Kurz <groug@kaod.org> | 2019-12-16 16:01:18 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-01-24 20:59:06 +0100 |
commit | bc9888f759baa64ab6084e4dd8e24ba80b0c3143 (patch) | |
tree | 79818bf4cea1aa49ee075c84ba35baa006bcc697 /target/s390x/cpu.c | |
parent | ef0a6249a80f05906dffa3a954e0563421972244 (diff) | |
download | qemu-bc9888f759baa64ab6084e4dd8e24ba80b0c3143.zip qemu-bc9888f759baa64ab6084e4dd8e24ba80b0c3143.tar.gz qemu-bc9888f759baa64ab6084e4dd8e24ba80b0c3143.tar.bz2 |
cpu: Use cpu_class_set_parent_reset()
Convert all targets to use cpu_class_set_parent_reset() with the following
coccinelle script:
@@
type CPUParentClass;
CPUParentClass *pcc;
CPUClass *cc;
identifier parent_fn;
identifier child_fn;
@@
+cpu_class_set_parent_reset(cc, child_fn, &pcc->parent_fn);
-pcc->parent_fn = cc->reset;
...
-cc->reset = child_fn;
Signed-off-by: Greg Kurz <groug@kaod.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
Message-Id: <157650847817.354886.7047137349018460524.stgit@bahia.lan>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/s390x/cpu.c')
-rw-r--r-- | target/s390x/cpu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 625daee..ca487f5 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -456,12 +456,11 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) dc->props = s390x_cpu_properties; dc->user_creatable = true; - scc->parent_reset = cc->reset; + cpu_class_set_parent_reset(cc, s390_cpu_reset_full, &scc->parent_reset); #if !defined(CONFIG_USER_ONLY) scc->load_normal = s390_cpu_load_normal; #endif scc->reset = s390_cpu_reset; - cc->reset = s390_cpu_reset_full; cc->class_by_name = s390_cpu_class_by_name, cc->has_work = s390_cpu_has_work; #ifdef CONFIG_TCG |