1 #ifndef _ASM_S390X_S390_H
2 #define _ASM_S390X_S390_H
4 #include <linux/compat.h>
5 #include <linux/socket.h>
6 #include <linux/syscalls.h>
7 #include <linux/nfs_fs.h>
8 #include <linux/sunrpc/svc.h>
9 #include <linux/nfsd/nfsd.h>
10 #include <linux/nfsd/export.h>
12 /* Macro that masks the high order bit of an 32 bit pointer and converts it*/
13 /* to a 64 bit pointer */
14 #define A(__x) ((unsigned long)((__x) & 0x7FFFFFFFUL))
16 ((unsigned long)(__x))
18 /* Now 32bit compatibility types */
19 struct ipc_kludge_32 {
20 __u32 msgp; /* pointer */
24 struct old_sigaction32 {
25 __u32 sa_handler; /* Really a pointer, but need to deal with 32 bits */
26 compat_old_sigset_t sa_mask; /* A 32 bit mask */
28 __u32 sa_restorer; /* Another 32 bit pointer */
31 typedef struct compat_siginfo {
37 int _pad[((128/sizeof(int)) - 3)];
41 pid_t _pid; /* sender's pid */
42 uid_t _uid; /* sender's uid */
47 compat_timer_t _tid; /* timer id */
48 int _overrun; /* overrun count */
49 compat_sigval_t _sigval; /* same as below */
50 int _sys_private; /* not to be passed to user */
53 /* POSIX.1b signals */
55 pid_t _pid; /* sender's pid */
56 uid_t _uid; /* sender's uid */
57 compat_sigval_t _sigval;
62 pid_t _pid; /* which child */
63 uid_t _uid; /* sender's uid */
64 int _status;/* exit code */
65 compat_clock_t _utime;
66 compat_clock_t _stime;
69 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
71 __u32 _addr; /* faulting insn/memory ref. - pointer */
76 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
83 * How these fields are to be accessed.
85 #define si_pid _sifields._kill._pid
86 #define si_uid _sifields._kill._uid
87 #define si_status _sifields._sigchld._status
88 #define si_utime _sifields._sigchld._utime
89 #define si_stime _sifields._sigchld._stime
90 #define si_value _sifields._rt._sigval
91 #define si_int _sifields._rt._sigval.sival_int
92 #define si_ptr _sifields._rt._sigval.sival_ptr
93 #define si_addr _sifields._sigfault._addr
94 #define si_band _sifields._sigpoll._band
95 #define si_fd _sifields._sigpoll._fd
96 #define si_tid _sifields._timer._tid
97 #define si_overrun _sifields._timer._overrun
99 /* asm/sigcontext.h */
109 freg_t32 fprs[__NUM_FPRS];
116 } _psw_t32 __attribute__ ((aligned(8)));
118 #define PSW32_MASK_PER 0x40000000UL
119 #define PSW32_MASK_DAT 0x04000000UL
120 #define PSW32_MASK_IO 0x02000000UL
121 #define PSW32_MASK_EXT 0x01000000UL
122 #define PSW32_MASK_KEY 0x00F00000UL
123 #define PSW32_MASK_MCHECK 0x00040000UL
124 #define PSW32_MASK_WAIT 0x00020000UL
125 #define PSW32_MASK_PSTATE 0x00010000UL
126 #define PSW32_MASK_ASC 0x0000C000UL
127 #define PSW32_MASK_CC 0x00003000UL
128 #define PSW32_MASK_PM 0x00000f00UL
130 #define PSW32_ADDR_AMODE31 0x80000000UL
131 #define PSW32_ADDR_INSN 0x7FFFFFFFUL
133 #define PSW32_BASE_BITS 0x00080000UL
135 #define PSW32_ASC_PRIMARY 0x00000000UL
136 #define PSW32_ASC_ACCREG 0x00004000UL
137 #define PSW32_ASC_SECONDARY 0x00008000UL
138 #define PSW32_ASC_HOME 0x0000C000UL
140 #define PSW32_USER_BITS (PSW32_BASE_BITS | PSW32_MASK_DAT | PSW32_ASC_HOME | \
141 PSW32_MASK_IO | PSW32_MASK_EXT | PSW32_MASK_MCHECK | \
144 #define PSW32_MASK_MERGE(CURRENT,NEW) \
145 (((CURRENT) & ~(PSW32_MASK_CC|PSW32_MASK_PM)) | \
146 ((NEW) & (PSW32_MASK_CC|PSW32_MASK_PM)))
152 __u32 gprs[__NUM_GPRS];
153 __u32 acrs[__NUM_ACRS];
154 } _s390_regs_common32;
158 _s390_regs_common32 regs;
159 _s390_fp_regs32 fpregs;
162 #define _SIGCONTEXT_NSIG32 64
163 #define _SIGCONTEXT_NSIG_BPW32 32
164 #define __SIGNAL_FRAMESIZE32 96
165 #define _SIGMASK_COPY_SIZE32 (sizeof(u32)*2)
169 __u32 oldmask[_COMPAT_NSIG_WORDS];
170 __u32 sregs; /* pointer */
175 __u32 sa_handler; /* pointer */
177 __u32 sa_restorer; /* pointer */
178 compat_sigset_t sa_mask; /* mask last for extensibility */
182 __u32 ss_sp; /* pointer */
184 compat_size_t ss_size;
190 __u32 uc_link; /* pointer */
192 _sigregs32 uc_mcontext;
193 compat_sigset_t uc_sigmask; /* mask last for extensibility */
196 #endif /* _ASM_S390X_S390_H */