aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/cpu-qom.h
diff options
context:
space:
mode:
authorJanosch Frank <frankja@linux.ibm.com>2019-11-27 12:50:42 -0500
committerCornelia Huck <cohuck@redhat.com>2019-12-14 10:25:50 +0100
commiteac4f82791f1807c423e85670837db103b9d59b3 (patch)
treea8f9e66fba44f15fb99f8b010f317efbaadc1a1c /target/s390x/cpu-qom.h
parentec9227339fce99412830d44a37eb0bd2fadd5f75 (diff)
s390x: Move reset normal to shared reset handler
Let's start moving the cpu reset functions into a single function with a switch/case, so we can later use fallthroughs and share more code between resets. This patch introduces the reset function by renaming cpu_reset(). Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20191127175046.4911-3-frankja@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/cpu-qom.h')
-rw-r--r--target/s390x/cpu-qom.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h
index b809ec8418..f3b71bac67 100644
--- a/target/s390x/cpu-qom.h
+++ b/target/s390x/cpu-qom.h
@@ -34,6 +34,10 @@
typedef struct S390CPUModel S390CPUModel;
typedef struct S390CPUDef S390CPUDef;
+typedef enum cpu_reset_type {
+ S390_CPU_RESET_NORMAL,
+} cpu_reset_type;
+
/**
* S390CPUClass:
* @parent_realize: The parent class' realize handler.
@@ -57,7 +61,7 @@ typedef struct S390CPUClass {
DeviceRealize parent_realize;
void (*parent_reset)(CPUState *cpu);
void (*load_normal)(CPUState *cpu);
- void (*cpu_reset)(CPUState *cpu);
+ void (*reset)(CPUState *cpu, cpu_reset_type type);
void (*initial_cpu_reset)(CPUState *cpu);
} S390CPUClass;