Skip to content

Commit

Permalink
target/s390x/cpu: Restrict CPUS390XState declaration to 'cpu.h'
Browse files Browse the repository at this point in the history
"target/s390x/cpu-qom.h" has to be target-agnostic. However, it
currently declares CPUS390XState, which is target-specific.
Move that declaration to "cpu.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20231106114500.5269-5-philmd@linaro.org>
  • Loading branch information
philmd committed Nov 7, 2023
1 parent 1663e88 commit 571568a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions target/s390x/cpu-qom.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ OBJECT_DECLARE_CPU_TYPE(S390CPU, S390CPUClass, S390_CPU)
typedef struct S390CPUModel S390CPUModel;
typedef struct S390CPUDef S390CPUDef;

typedef struct CPUArchState CPUS390XState;

typedef enum cpu_reset_type {
S390_CPU_RESET_NORMAL,
S390_CPU_RESET_INITIAL,
Expand Down
4 changes: 2 additions & 2 deletions target/s390x/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ typedef struct PSW {
uint64_t addr;
} PSW;

struct CPUArchState {
typedef struct CPUArchState {
uint64_t regs[16]; /* GP registers */
/*
* The floating point registers are part of the vector registers.
Expand Down Expand Up @@ -157,7 +157,7 @@ struct CPUArchState {
/* currently processed sigp order */
uint8_t sigp_order;

};
} CPUS390XState;

static inline uint64_t *get_freg(CPUS390XState *cs, int nr)
{
Expand Down

0 comments on commit 571568a

Please sign in to comment.