1 #ifndef _ASM_IA64_COMPAT_H
2 #define _ASM_IA64_COMPAT_H
4 * Architecture specific compatibility types
6 #include <linux/types.h>
8 #define COMPAT_USER_HZ 100
10 typedef u32 compat_size_t;
11 typedef s32 compat_ssize_t;
12 typedef s32 compat_time_t;
13 typedef s32 compat_clock_t;
14 typedef s32 compat_pid_t;
15 typedef u16 compat_uid_t;
16 typedef u16 compat_gid_t;
17 typedef u32 compat_uid32_t;
18 typedef u32 compat_gid32_t;
19 typedef u16 compat_mode_t;
20 typedef u32 compat_ino_t;
21 typedef u16 compat_dev_t;
22 typedef s32 compat_off_t;
23 typedef s64 compat_loff_t;
24 typedef u16 compat_nlink_t;
25 typedef u16 compat_ipc_pid_t;
26 typedef s32 compat_daddr_t;
27 typedef u32 compat_caddr_t;
28 typedef __kernel_fsid_t compat_fsid_t;
30 typedef s32 compat_int_t;
31 typedef s32 compat_long_t;
32 typedef u32 compat_uint_t;
33 typedef u32 compat_ulong_t;
35 struct compat_timespec {
40 struct compat_timeval {
49 compat_mode_t st_mode;
50 compat_nlink_t st_nlink;
81 * IA32 uses 4 byte alignment for 64 bit quantities,
82 * so we need to pack this structure.
84 struct compat_flock64 {
87 compat_loff_t l_start;
90 } __attribute__((packed));
92 struct compat_statfs {
100 compat_fsid_t f_fsid;
101 int f_namelen; /* SunOS ignores this field. */
106 #define COMPAT_RLIM_OLD_INFINITY 0x7fffffff
107 #define COMPAT_RLIM_INFINITY 0xffffffff
109 typedef u32 compat_old_sigset_t; /* at least 32 bits */
111 #define _COMPAT_NSIG 64
112 #define _COMPAT_NSIG_BPW 32
114 typedef u32 compat_sigset_word;
116 #define COMPAT_OFF_T_MAX 0x7fffffff
117 #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
120 * A pointer passed in from user mode. This should not be used for syscall parameters,
121 * just declare them as pointers because the syscall entry code will have appropriately
122 * comverted them already.
124 typedef u32 compat_uptr_t;
127 compat_ptr (compat_uptr_t uptr)
129 return (void *) (unsigned long) uptr;
132 static __inline__ void *
133 compat_alloc_user_space (long len)
135 struct pt_regs *regs = ia64_task_regs(current);
136 return (void *) ((regs->r12 & -16) - len);
139 #endif /* _ASM_IA64_COMPAT_H */