1 #ifndef HAVE_S390_COMPAT_REGS
2 typedef struct {
3 	uint32_t mask;
4 	uint32_t addr;
5 } ATTRIBUTE_ALIGNED(8) psw_compat_t;
6 
7 typedef struct {
8 	psw_compat_t psw;
9 	uint32_t gprs[NUM_GPRS];
10 	uint32_t acrs[NUM_ACRS];
11 	uint32_t orig_gpr2;
12 } s390_compat_regs;
13 #endif
14 
15 static union {
16 	s390_compat_regs s390_regs;
17 	s390_regs s390x_regs;
18 } s390x_regs_union;
19 
20 #define s390_regset	s390x_regs_union.s390_regs
21 #define s390x_regset	s390x_regs_union.s390x_regs
22 
23 uint32_t *const s390_frame_ptr = &s390_regset.gprs[15];
24 unsigned long *const s390x_frame_ptr = &s390x_regset.gprs[15];
25 
26 static struct iovec s390x_io = {
27 	.iov_base = &s390x_regs_union,
28 };
29 
30 
31 #define ARCH_REGS_FOR_GETREGSET  s390x_regs_union
32 #define ARCH_IOVEC_FOR_GETREGSET s390x_io
33 #define ARCH_PC_REG \
34 	(s390x_io.iov_len == sizeof(s390_regset) ? \
35 			     s390_regset.psw.addr : s390x_regset.psw.addr)
36 
37 #define ARCH_PERSONALITY_0_IOV_SIZE sizeof(s390x_regset)
38 #define ARCH_PERSONALITY_1_IOV_SIZE sizeof(s390_regset)
39