On Thu, 28 Aug 2025 at 13:14, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Move target_psw_t to target_ptrace.h.
> Remove the target_pt_regs; add target_s390x_reg to target_ptrace.h,
> which matches what is actually used.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> linux-user/s390x/target_ptrace.h | 18 ++++++++++++++++++
> linux-user/s390x/target_syscall.h | 22 ----------------------
> linux-user/s390x/signal.c | 1 +
> 3 files changed, 19 insertions(+), 22 deletions(-)
> create mode 100644 linux-user/s390x/target_ptrace.h
>
> diff --git a/linux-user/s390x/target_ptrace.h b/linux-user/s390x/target_ptrace.h
> new file mode 100644
> index 0000000000..a5ceb75a74
> --- /dev/null
> +++ b/linux-user/s390x/target_ptrace.h
> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +
> +#ifndef S390X_TARGET_PTRACE_H
> +#define S390X_TARGET_PTRACE_H
> +
> +typedef struct {
> + abi_ulong mask;
> + abi_ulong addr;
> +} target_psw_t;
> +
> +struct target_s390_regs {
> + target_psw_t psw;
> + abi_ulong gprs[16];
> + abi_uint acrs[16];
> + abi_ulong orig_gpr2;
> +};
> +
> +#endif /* S390X_TARGET_PTRACE_H */
> diff --git a/linux-user/s390x/target_syscall.h b/linux-user/s390x/target_syscall.h
> index 4018988a25..f01f9a0baa 100644
> --- a/linux-user/s390x/target_syscall.h
> +++ b/linux-user/s390x/target_syscall.h
> @@ -1,28 +1,6 @@
> #ifndef S390X_TARGET_SYSCALL_H
> #define S390X_TARGET_SYSCALL_H
>
> -/* this typedef defines how a Program Status Word looks like */
> -typedef struct {
> - abi_ulong mask;
> - abi_ulong addr;
> -} __attribute__ ((aligned(8))) target_psw_t;
You might mention in the commit message that abi_ulong
already has an aligned attribute which for s390 will be 8,
so it's OK to drop the attribute on the struct here.
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM