1 #ifndef _ASM_S390X_S390_H
2 #define _ASM_S390X_S390_H
4 #include <linux/config.h>
5 #include <linux/compat.h>
6 #include <linux/socket.h>
7 #include <linux/syscalls.h>
8 #include <linux/nfs_fs.h>
9 #include <linux/sunrpc/svc.h>
10 #include <linux/nfsd/nfsd.h>
11 #include <linux/nfsd/export.h>
13 /* Macro that masks the high order bit of an 32 bit pointer and converts it*/
14 /* to a 64 bit pointer */
15 #define A(__x) ((unsigned long)((__x) & 0x7FFFFFFFUL))
17 ((unsigned long)(__x))
19 /* Now 32bit compatibility types */
20 struct ipc_kludge_32 {
21 __u32 msgp; /* pointer */
25 struct old_sigaction32 {
26 __u32 sa_handler; /* Really a pointer, but need to deal with 32 bits */
27 compat_old_sigset_t sa_mask; /* A 32 bit mask */
29 __u32 sa_restorer; /* Another 32 bit pointer */
32 typedef struct compat_siginfo {
38 int _pad[((128/sizeof(int)) - 3)];
42 pid_t _pid; /* sender's pid */
43 uid_t _uid; /* sender's uid */
48 compat_timer_t _tid; /* timer id */
49 int _overrun; /* overrun count */
50 compat_sigval_t _sigval; /* same as below */
51 int _sys_private; /* not to be passed to user */
54 /* POSIX.1b signals */
56 pid_t _pid; /* sender's pid */
57 uid_t _uid; /* sender's uid */
58 compat_sigval_t _sigval;
63 pid_t _pid; /* which child */
64 uid_t _uid; /* sender's uid */
65 int _status;/* exit code */
66 compat_clock_t _utime;
67 compat_clock_t _stime;
70 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
72 __u32 _addr; /* faulting insn/memory ref. - pointer */
77 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
84 * How these fields are to be accessed.
86 #define si_pid _sifields._kill._pid
87 #define si_uid _sifields._kill._uid
88 #define si_status _sifields._sigchld._status
89 #define si_utime _sifields._sigchld._utime
90 #define si_stime _sifields._sigchld._stime
91 #define si_value _sifields._rt._sigval
92 #define si_int _sifields._rt._sigval.sival_int
93 #define si_ptr _sifields._rt._sigval.sival_ptr
94 #define si_addr _sifields._sigfault._addr
95 #define si_band _sifields._sigpoll._band
96 #define si_fd _sifields._sigpoll._fd
97 #define si_tid _sifields._timer._tid
98 #define si_overrun _sifields._timer._overrun
100 /* asm/sigcontext.h */
110 freg_t32 fprs[__NUM_FPRS];
117 } _psw_t32 __attribute__ ((aligned(8)));
119 #define PSW32_MASK_PER 0x40000000UL
120 #define PSW32_MASK_DAT 0x04000000UL
121 #define PSW32_MASK_IO 0x02000000UL
122 #define PSW32_MASK_EXT 0x01000000UL
123 #define PSW32_MASK_KEY 0x00F00000UL
124 #define PSW32_MASK_MCHECK 0x00040000UL
125 #define PSW32_MASK_WAIT 0x00020000UL
126 #define PSW32_MASK_PSTATE 0x00010000UL
127 #define PSW32_MASK_ASC 0x0000C000UL
128 #define PSW32_MASK_CC 0x00003000UL
129 #define PSW32_MASK_PM 0x00000f00UL
131 #define PSW32_ADDR_AMODE31 0x80000000UL
132 #define PSW32_ADDR_INSN 0x7FFFFFFFUL
134 #define PSW32_BASE_BITS 0x00080000UL
136 #define PSW32_ASC_PRIMARY 0x00000000UL
137 #define PSW32_ASC_ACCREG 0x00004000UL
138 #define PSW32_ASC_SECONDARY 0x00008000UL
139 #define PSW32_ASC_HOME 0x0000C000UL
141 #define PSW32_USER_BITS (PSW32_BASE_BITS | PSW32_MASK_DAT | PSW32_ASC_HOME | \
142 PSW32_MASK_IO | PSW32_MASK_EXT | PSW32_MASK_MCHECK | \
145 #define PSW32_MASK_MERGE(CURRENT,NEW) \
146 (((CURRENT) & ~(PSW32_MASK_CC|PSW32_MASK_PM)) | \
147 ((NEW) & (PSW32_MASK_CC|PSW32_MASK_PM)))
153 __u32 gprs[__NUM_GPRS];
154 __u32 acrs[__NUM_ACRS];
155 } _s390_regs_common32;
159 _s390_regs_common32 regs;
160 _s390_fp_regs32 fpregs;
163 #define _SIGCONTEXT_NSIG32 64
164 #define _SIGCONTEXT_NSIG_BPW32 32
165 #define __SIGNAL_FRAMESIZE32 96
166 #define _SIGMASK_COPY_SIZE32 (sizeof(u32)*2)
170 __u32 oldmask[_COMPAT_NSIG_WORDS];
171 __u32 sregs; /* pointer */
176 __u32 sa_handler; /* pointer */
178 __u32 sa_restorer; /* pointer */
179 compat_sigset_t sa_mask; /* mask last for extensibility */
183 __u32 ss_sp; /* pointer */
185 compat_size_t ss_size;
191 __u32 uc_link; /* pointer */
193 _sigregs32 uc_mcontext;
194 compat_sigset_t uc_sigmask; /* mask last for extensibility */
197 #endif /* _ASM_S390X_S390_H */