.. | .. |
---|
9 | 9 | #include <linux/sched/task_stack.h> |
---|
10 | 10 | #include <linux/thread_info.h> |
---|
11 | 11 | |
---|
| 12 | +#include <asm-generic/compat.h> |
---|
| 13 | + |
---|
12 | 14 | #define __TYPE_IS_PTR(t) (!__builtin_types_compatible_p( \ |
---|
13 | 15 | typeof(0?(__force t)0:0ULL), u64)) |
---|
14 | 16 | |
---|
.. | .. |
---|
51 | 53 | #define COMPAT_USER_HZ 100 |
---|
52 | 54 | #define COMPAT_UTS_MACHINE "s390\0\0\0\0" |
---|
53 | 55 | |
---|
54 | | -typedef u32 compat_size_t; |
---|
55 | | -typedef s32 compat_ssize_t; |
---|
56 | | -typedef s32 compat_clock_t; |
---|
57 | | -typedef s32 compat_pid_t; |
---|
58 | 56 | typedef u16 __compat_uid_t; |
---|
59 | 57 | typedef u16 __compat_gid_t; |
---|
60 | 58 | typedef u32 __compat_uid32_t; |
---|
61 | 59 | typedef u32 __compat_gid32_t; |
---|
62 | 60 | typedef u16 compat_mode_t; |
---|
63 | | -typedef u32 compat_ino_t; |
---|
64 | 61 | typedef u16 compat_dev_t; |
---|
65 | | -typedef s32 compat_off_t; |
---|
66 | | -typedef s64 compat_loff_t; |
---|
67 | 62 | typedef u16 compat_nlink_t; |
---|
68 | 63 | typedef u16 compat_ipc_pid_t; |
---|
69 | | -typedef s32 compat_daddr_t; |
---|
70 | 64 | typedef u32 compat_caddr_t; |
---|
71 | 65 | typedef __kernel_fsid_t compat_fsid_t; |
---|
72 | | -typedef s32 compat_key_t; |
---|
73 | | -typedef s32 compat_timer_t; |
---|
74 | | - |
---|
75 | | -typedef s32 compat_int_t; |
---|
76 | | -typedef s32 compat_long_t; |
---|
77 | | -typedef s64 compat_s64; |
---|
78 | | -typedef u32 compat_uint_t; |
---|
79 | | -typedef u32 compat_ulong_t; |
---|
80 | | -typedef u64 compat_u64; |
---|
81 | | -typedef u32 compat_uptr_t; |
---|
82 | 66 | |
---|
83 | 67 | typedef struct { |
---|
84 | 68 | u32 mask; |
---|
.. | .. |
---|
191 | 175 | { |
---|
192 | 176 | return (void __user *)(unsigned long)(uptr & 0x7fffffffUL); |
---|
193 | 177 | } |
---|
194 | | - |
---|
195 | | -static inline compat_uptr_t ptr_to_compat(void __user *uptr) |
---|
196 | | -{ |
---|
197 | | - return (u32)(unsigned long)uptr; |
---|
198 | | -} |
---|
| 178 | +#define compat_ptr(uptr) compat_ptr(uptr) |
---|
199 | 179 | |
---|
200 | 180 | #ifdef CONFIG_COMPAT |
---|
201 | 181 | |
---|