hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/s390/include/asm/compat.h
....@@ -9,6 +9,8 @@
99 #include <linux/sched/task_stack.h>
1010 #include <linux/thread_info.h>
1111
12
+#include <asm-generic/compat.h>
13
+
1214 #define __TYPE_IS_PTR(t) (!__builtin_types_compatible_p( \
1315 typeof(0?(__force t)0:0ULL), u64))
1416
....@@ -51,34 +53,16 @@
5153 #define COMPAT_USER_HZ 100
5254 #define COMPAT_UTS_MACHINE "s390\0\0\0\0"
5355
54
-typedef u32 compat_size_t;
55
-typedef s32 compat_ssize_t;
56
-typedef s32 compat_clock_t;
57
-typedef s32 compat_pid_t;
5856 typedef u16 __compat_uid_t;
5957 typedef u16 __compat_gid_t;
6058 typedef u32 __compat_uid32_t;
6159 typedef u32 __compat_gid32_t;
6260 typedef u16 compat_mode_t;
63
-typedef u32 compat_ino_t;
6461 typedef u16 compat_dev_t;
65
-typedef s32 compat_off_t;
66
-typedef s64 compat_loff_t;
6762 typedef u16 compat_nlink_t;
6863 typedef u16 compat_ipc_pid_t;
69
-typedef s32 compat_daddr_t;
7064 typedef u32 compat_caddr_t;
7165 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;
8266
8367 typedef struct {
8468 u32 mask;
....@@ -191,11 +175,7 @@
191175 {
192176 return (void __user *)(unsigned long)(uptr & 0x7fffffffUL);
193177 }
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)
199179
200180 #ifdef CONFIG_COMPAT
201181