hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/powerpc/include/asm/compat.h
....@@ -8,6 +8,8 @@
88 #include <linux/types.h>
99 #include <linux/sched.h>
1010
11
+#include <asm-generic/compat.h>
12
+
1113 #define COMPAT_USER_HZ 100
1214 #ifdef __BIG_ENDIAN__
1315 #define COMPAT_UTS_MACHINE "ppc\0\0"
....@@ -15,34 +17,16 @@
1517 #define COMPAT_UTS_MACHINE "ppcle\0\0"
1618 #endif
1719
18
-typedef u32 compat_size_t;
19
-typedef s32 compat_ssize_t;
20
-typedef s32 compat_clock_t;
21
-typedef s32 compat_pid_t;
2220 typedef u32 __compat_uid_t;
2321 typedef u32 __compat_gid_t;
2422 typedef u32 __compat_uid32_t;
2523 typedef u32 __compat_gid32_t;
2624 typedef u32 compat_mode_t;
27
-typedef u32 compat_ino_t;
2825 typedef u32 compat_dev_t;
29
-typedef s32 compat_off_t;
30
-typedef s64 compat_loff_t;
3126 typedef s16 compat_nlink_t;
3227 typedef u16 compat_ipc_pid_t;
33
-typedef s32 compat_daddr_t;
3428 typedef u32 compat_caddr_t;
3529 typedef __kernel_fsid_t compat_fsid_t;
36
-typedef s32 compat_key_t;
37
-typedef s32 compat_timer_t;
38
-
39
-typedef s32 compat_int_t;
40
-typedef s32 compat_long_t;
41
-typedef s64 compat_s64;
42
-typedef u32 compat_uint_t;
43
-typedef u32 compat_ulong_t;
44
-typedef u64 compat_u64;
45
-typedef u32 compat_uptr_t;
4630
4731 struct compat_stat {
4832 compat_dev_t st_dev;
....@@ -55,11 +39,11 @@
5539 compat_off_t st_size;
5640 compat_off_t st_blksize;
5741 compat_off_t st_blocks;
58
- compat_time_t st_atime;
42
+ old_time32_t st_atime;
5943 u32 st_atime_nsec;
60
- compat_time_t st_mtime;
44
+ old_time32_t st_mtime;
6145 u32 st_mtime_nsec;
62
- compat_time_t st_ctime;
46
+ old_time32_t st_ctime;
6347 u32 st_ctime_nsec;
6448 u32 __unused4[2];
6549 };
....@@ -109,23 +93,6 @@
10993 typedef u32 compat_sigset_word;
11094
11195 #define COMPAT_OFF_T_MAX 0x7fffffff
112
-
113
-/*
114
- * A pointer passed in from user mode. This should not
115
- * be used for syscall parameters, just declare them
116
- * as pointers because the syscall entry code will have
117
- * appropriately converted them already.
118
- */
119
-
120
-static inline void __user *compat_ptr(compat_uptr_t uptr)
121
-{
122
- return (void __user *)(unsigned long)uptr;
123
-}
124
-
125
-static inline compat_uptr_t ptr_to_compat(void __user *uptr)
126
-{
127
- return (u32)(unsigned long)uptr;
128
-}
12996
13097 static inline void __user *arch_compat_alloc_user_space(long len)
13198 {