.. | .. |
---|
9 | 9 | #include <asm/page.h> |
---|
10 | 10 | #include <asm/ptrace.h> |
---|
11 | 11 | |
---|
| 12 | +#include <asm-generic/compat.h> |
---|
| 13 | + |
---|
12 | 14 | #define COMPAT_USER_HZ 100 |
---|
13 | 15 | #define COMPAT_UTS_MACHINE "mips\0\0\0" |
---|
14 | 16 | |
---|
15 | | -typedef u32 compat_size_t; |
---|
16 | | -typedef s32 compat_ssize_t; |
---|
17 | | -typedef s32 compat_clock_t; |
---|
18 | | -typedef s32 compat_suseconds_t; |
---|
19 | | - |
---|
20 | | -typedef s32 compat_pid_t; |
---|
21 | 17 | typedef s32 __compat_uid_t; |
---|
22 | 18 | typedef s32 __compat_gid_t; |
---|
23 | 19 | typedef __compat_uid_t __compat_uid32_t; |
---|
24 | 20 | typedef __compat_gid_t __compat_gid32_t; |
---|
25 | 21 | typedef u32 compat_mode_t; |
---|
26 | | -typedef u32 compat_ino_t; |
---|
27 | 22 | typedef u32 compat_dev_t; |
---|
28 | | -typedef s32 compat_off_t; |
---|
29 | | -typedef s64 compat_loff_t; |
---|
30 | 23 | typedef u32 compat_nlink_t; |
---|
31 | 24 | typedef s32 compat_ipc_pid_t; |
---|
32 | | -typedef s32 compat_daddr_t; |
---|
33 | 25 | typedef s32 compat_caddr_t; |
---|
34 | 26 | typedef struct { |
---|
35 | 27 | s32 val[2]; |
---|
36 | 28 | } compat_fsid_t; |
---|
37 | | -typedef s32 compat_timer_t; |
---|
38 | | -typedef s32 compat_key_t; |
---|
39 | | - |
---|
40 | | -typedef s16 compat_short_t; |
---|
41 | | -typedef s32 compat_int_t; |
---|
42 | | -typedef s32 compat_long_t; |
---|
43 | | -typedef s64 compat_s64; |
---|
44 | | -typedef u16 compat_ushort_t; |
---|
45 | | -typedef u32 compat_uint_t; |
---|
46 | | -typedef u32 compat_ulong_t; |
---|
47 | | -typedef u64 compat_u64; |
---|
48 | | -typedef u32 compat_uptr_t; |
---|
49 | 29 | |
---|
50 | 30 | struct compat_stat { |
---|
51 | 31 | compat_dev_t st_dev; |
---|
.. | .. |
---|
59 | 39 | s32 st_pad2[2]; |
---|
60 | 40 | compat_off_t st_size; |
---|
61 | 41 | s32 st_pad3; |
---|
62 | | - compat_time_t st_atime; |
---|
| 42 | + old_time32_t st_atime; |
---|
63 | 43 | s32 st_atime_nsec; |
---|
64 | | - compat_time_t st_mtime; |
---|
| 44 | + old_time32_t st_mtime; |
---|
65 | 45 | s32 st_mtime_nsec; |
---|
66 | | - compat_time_t st_ctime; |
---|
| 46 | + old_time32_t st_ctime; |
---|
67 | 47 | s32 st_ctime_nsec; |
---|
68 | 48 | s32 st_blksize; |
---|
69 | 49 | s32 st_blocks; |
---|
.. | .. |
---|
117 | 97 | typedef u32 compat_sigset_word; |
---|
118 | 98 | |
---|
119 | 99 | #define COMPAT_OFF_T_MAX 0x7fffffff |
---|
120 | | - |
---|
121 | | -/* |
---|
122 | | - * A pointer passed in from user mode. This should not |
---|
123 | | - * be used for syscall parameters, just declare them |
---|
124 | | - * as pointers because the syscall entry code will have |
---|
125 | | - * appropriately converted them already. |
---|
126 | | - */ |
---|
127 | | - |
---|
128 | | -static inline void __user *compat_ptr(compat_uptr_t uptr) |
---|
129 | | -{ |
---|
130 | | - /* cast to a __user pointer via "unsigned long" makes sparse happy */ |
---|
131 | | - return (void __user *)(unsigned long)(long)uptr; |
---|
132 | | -} |
---|
133 | | - |
---|
134 | | -static inline compat_uptr_t ptr_to_compat(void __user *uptr) |
---|
135 | | -{ |
---|
136 | | - return (u32)(unsigned long)uptr; |
---|
137 | | -} |
---|
138 | 100 | |
---|
139 | 101 | static inline void __user *arch_compat_alloc_user_space(long len) |
---|
140 | 102 | { |
---|