forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/arch/mips/include/asm/compat.h
....@@ -9,43 +9,23 @@
99 #include <asm/page.h>
1010 #include <asm/ptrace.h>
1111
12
+#include <asm-generic/compat.h>
13
+
1214 #define COMPAT_USER_HZ 100
1315 #define COMPAT_UTS_MACHINE "mips\0\0\0"
1416
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;
2117 typedef s32 __compat_uid_t;
2218 typedef s32 __compat_gid_t;
2319 typedef __compat_uid_t __compat_uid32_t;
2420 typedef __compat_gid_t __compat_gid32_t;
2521 typedef u32 compat_mode_t;
26
-typedef u32 compat_ino_t;
2722 typedef u32 compat_dev_t;
28
-typedef s32 compat_off_t;
29
-typedef s64 compat_loff_t;
3023 typedef u32 compat_nlink_t;
3124 typedef s32 compat_ipc_pid_t;
32
-typedef s32 compat_daddr_t;
3325 typedef s32 compat_caddr_t;
3426 typedef struct {
3527 s32 val[2];
3628 } 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;
4929
5030 struct compat_stat {
5131 compat_dev_t st_dev;
....@@ -59,11 +39,11 @@
5939 s32 st_pad2[2];
6040 compat_off_t st_size;
6141 s32 st_pad3;
62
- compat_time_t st_atime;
42
+ old_time32_t st_atime;
6343 s32 st_atime_nsec;
64
- compat_time_t st_mtime;
44
+ old_time32_t st_mtime;
6545 s32 st_mtime_nsec;
66
- compat_time_t st_ctime;
46
+ old_time32_t st_ctime;
6747 s32 st_ctime_nsec;
6848 s32 st_blksize;
6949 s32 st_blocks;
....@@ -117,24 +97,6 @@
11797 typedef u32 compat_sigset_word;
11898
11999 #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
-}
138100
139101 static inline void __user *arch_compat_alloc_user_space(long len)
140102 {