hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/arch/sparc/include/asm/compat.h
....@@ -6,37 +6,21 @@
66 */
77 #include <linux/types.h>
88
9
+#include <asm-generic/compat.h>
10
+
911 #define COMPAT_USER_HZ 100
1012 #define COMPAT_UTS_MACHINE "sparc\0\0"
1113
12
-typedef u32 compat_size_t;
13
-typedef s32 compat_ssize_t;
14
-typedef s32 compat_clock_t;
15
-typedef s32 compat_pid_t;
1614 typedef u16 __compat_uid_t;
1715 typedef u16 __compat_gid_t;
1816 typedef u32 __compat_uid32_t;
1917 typedef u32 __compat_gid32_t;
2018 typedef u16 compat_mode_t;
21
-typedef u32 compat_ino_t;
2219 typedef u16 compat_dev_t;
23
-typedef s32 compat_off_t;
24
-typedef s64 compat_loff_t;
2520 typedef s16 compat_nlink_t;
2621 typedef u16 compat_ipc_pid_t;
27
-typedef s32 compat_daddr_t;
2822 typedef u32 compat_caddr_t;
2923 typedef __kernel_fsid_t compat_fsid_t;
30
-typedef s32 compat_key_t;
31
-typedef s32 compat_timer_t;
32
-
33
-typedef s32 compat_int_t;
34
-typedef s32 compat_long_t;
35
-typedef s64 compat_s64;
36
-typedef u32 compat_uint_t;
37
-typedef u32 compat_ulong_t;
38
-typedef u64 compat_u64;
39
-typedef u32 compat_uptr_t;
4024
4125 struct compat_stat {
4226 compat_dev_t st_dev;
....@@ -47,11 +31,11 @@
4731 __compat_gid_t st_gid;
4832 compat_dev_t st_rdev;
4933 compat_off_t st_size;
50
- compat_time_t st_atime;
34
+ old_time32_t st_atime;
5135 compat_ulong_t st_atime_nsec;
52
- compat_time_t st_mtime;
36
+ old_time32_t st_mtime;
5337 compat_ulong_t st_mtime_nsec;
54
- compat_time_t st_ctime;
38
+ old_time32_t st_ctime;
5539 compat_ulong_t st_ctime_nsec;
5640 compat_off_t st_blksize;
5741 compat_off_t st_blocks;
....@@ -139,23 +123,6 @@
139123 typedef u32 compat_sigset_word;
140124
141125 #define COMPAT_OFF_T_MAX 0x7fffffff
142
-
143
-/*
144
- * A pointer passed in from user mode. This should not
145
- * be used for syscall parameters, just declare them
146
- * as pointers because the syscall entry code will have
147
- * appropriately converted them already.
148
- */
149
-
150
-static inline void __user *compat_ptr(compat_uptr_t uptr)
151
-{
152
- return (void __user *)(unsigned long)uptr;
153
-}
154
-
155
-static inline compat_uptr_t ptr_to_compat(void __user *uptr)
156
-{
157
- return (u32)(unsigned long)uptr;
158
-}
159126
160127 #ifdef CONFIG_COMPAT
161128 static inline void __user *arch_compat_alloc_user_space(long len)