1 #ifndef _ASM_S390X_COMPAT_H
2 #define _ASM_S390X_COMPAT_H
4 * Architecture specific compatibility types
6 #include <linux/types.h>
7 #include <linux/sched.h>
9 #define COMPAT_USER_HZ 100
11 typedef u32 compat_size_t
;
12 typedef s32 compat_ssize_t
;
13 typedef s32 compat_time_t
;
14 typedef s32 compat_clock_t
;
15 typedef s32 compat_pid_t
;
16 typedef u16 compat_uid_t
;
17 typedef u16 compat_gid_t
;
18 typedef u32 compat_uid32_t
;
19 typedef u32 compat_gid32_t
;
20 typedef u16 compat_mode_t
;
21 typedef u32 compat_ino_t
;
22 typedef u16 compat_dev_t
;
23 typedef s32 compat_off_t
;
24 typedef s64 compat_loff_t
;
25 typedef u16 compat_nlink_t
;
26 typedef u16 compat_ipc_pid_t
;
27 typedef s32 compat_daddr_t
;
28 typedef u32 compat_caddr_t
;
29 typedef __kernel_fsid_t compat_fsid_t
;
30 typedef s32 compat_key_t
;
31 typedef s32 compat_timer_t
;
33 typedef s32 compat_int_t
;
34 typedef s32 compat_long_t
;
35 typedef u32 compat_uint_t
;
36 typedef u32 compat_ulong_t
;
38 struct compat_timespec
{
43 struct compat_timeval
{
52 compat_mode_t st_mode
;
53 compat_nlink_t st_nlink
;
83 struct compat_flock64
{
86 compat_loff_t l_start
;
91 struct compat_statfs
{
105 #define COMPAT_RLIM_OLD_INFINITY 0x7fffffff
106 #define COMPAT_RLIM_INFINITY 0xffffffff
108 typedef u32 compat_old_sigset_t
; /* at least 32 bits */
110 #define _COMPAT_NSIG 64
111 #define _COMPAT_NSIG_BPW 32
113 typedef u32 compat_sigset_word
;
115 #define COMPAT_OFF_T_MAX 0x7fffffff
116 #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
119 * A pointer passed in from user mode. This should not
120 * be used for syscall parameters, just declare them
121 * as pointers because the syscall entry code will have
122 * appropriately comverted them already.
124 typedef u32 compat_uptr_t
;
126 static inline void __user
*compat_ptr(compat_uptr_t uptr
)
128 return (void __user
*)(unsigned long)(uptr
& 0x7fffffffUL
);
131 static inline void __user
*compat_alloc_user_space(long len
)
135 stack
= KSTK_ESP(current
);
136 if (test_thread_flag(TIF_31BIT
))
137 stack
&= 0x7fffffffUL
;
138 return (void __user
*) (stack
- len
);
141 struct compat_ipc64_perm
{
148 unsigned short __pad1
;
150 unsigned short __pad2
;
151 unsigned int __unused1
;
152 unsigned int __unused2
;
155 struct compat_semid64_ds
{
156 struct compat_ipc64_perm sem_perm
;
157 compat_time_t sem_otime
;
158 compat_ulong_t __pad1
;
159 compat_time_t sem_ctime
;
160 compat_ulong_t __pad2
;
161 compat_ulong_t sem_nsems
;
162 compat_ulong_t __unused1
;
163 compat_ulong_t __unused2
;
166 struct compat_msqid64_ds
{
167 struct compat_ipc64_perm msg_perm
;
168 compat_time_t msg_stime
;
169 compat_ulong_t __pad1
;
170 compat_time_t msg_rtime
;
171 compat_ulong_t __pad2
;
172 compat_time_t msg_ctime
;
173 compat_ulong_t __pad3
;
174 compat_ulong_t msg_cbytes
;
175 compat_ulong_t msg_qnum
;
176 compat_ulong_t msg_qbytes
;
177 compat_pid_t msg_lspid
;
178 compat_pid_t msg_lrpid
;
179 compat_ulong_t __unused1
;
180 compat_ulong_t __unused2
;
183 struct compat_shmid64_ds
{
184 struct compat_ipc64_perm shm_perm
;
185 compat_size_t shm_segsz
;
186 compat_time_t shm_atime
;
187 compat_ulong_t __pad1
;
188 compat_time_t shm_dtime
;
189 compat_ulong_t __pad2
;
190 compat_time_t shm_ctime
;
191 compat_ulong_t __pad3
;
192 compat_pid_t shm_cpid
;
193 compat_pid_t shm_lpid
;
194 compat_ulong_t shm_nattch
;
195 compat_ulong_t __unused1
;
196 compat_ulong_t __unused2
;
198 #endif /* _ASM_S390X_COMPAT_H */