| .. | .. |
|---|
| 8 | 8 | #include <linux/types.h> |
|---|
| 9 | 9 | #include <linux/sched.h> |
|---|
| 10 | 10 | |
|---|
| 11 | +#include <asm-generic/compat.h> |
|---|
| 12 | + |
|---|
| 11 | 13 | #define COMPAT_USER_HZ 100 |
|---|
| 12 | 14 | #ifdef __BIG_ENDIAN__ |
|---|
| 13 | 15 | #define COMPAT_UTS_MACHINE "ppc\0\0" |
|---|
| .. | .. |
|---|
| 15 | 17 | #define COMPAT_UTS_MACHINE "ppcle\0\0" |
|---|
| 16 | 18 | #endif |
|---|
| 17 | 19 | |
|---|
| 18 | | -typedef u32 compat_size_t; |
|---|
| 19 | | -typedef s32 compat_ssize_t; |
|---|
| 20 | | -typedef s32 compat_clock_t; |
|---|
| 21 | | -typedef s32 compat_pid_t; |
|---|
| 22 | 20 | typedef u32 __compat_uid_t; |
|---|
| 23 | 21 | typedef u32 __compat_gid_t; |
|---|
| 24 | 22 | typedef u32 __compat_uid32_t; |
|---|
| 25 | 23 | typedef u32 __compat_gid32_t; |
|---|
| 26 | 24 | typedef u32 compat_mode_t; |
|---|
| 27 | | -typedef u32 compat_ino_t; |
|---|
| 28 | 25 | typedef u32 compat_dev_t; |
|---|
| 29 | | -typedef s32 compat_off_t; |
|---|
| 30 | | -typedef s64 compat_loff_t; |
|---|
| 31 | 26 | typedef s16 compat_nlink_t; |
|---|
| 32 | 27 | typedef u16 compat_ipc_pid_t; |
|---|
| 33 | | -typedef s32 compat_daddr_t; |
|---|
| 34 | 28 | typedef u32 compat_caddr_t; |
|---|
| 35 | 29 | 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; |
|---|
| 46 | 30 | |
|---|
| 47 | 31 | struct compat_stat { |
|---|
| 48 | 32 | compat_dev_t st_dev; |
|---|
| .. | .. |
|---|
| 55 | 39 | compat_off_t st_size; |
|---|
| 56 | 40 | compat_off_t st_blksize; |
|---|
| 57 | 41 | compat_off_t st_blocks; |
|---|
| 58 | | - compat_time_t st_atime; |
|---|
| 42 | + old_time32_t st_atime; |
|---|
| 59 | 43 | u32 st_atime_nsec; |
|---|
| 60 | | - compat_time_t st_mtime; |
|---|
| 44 | + old_time32_t st_mtime; |
|---|
| 61 | 45 | u32 st_mtime_nsec; |
|---|
| 62 | | - compat_time_t st_ctime; |
|---|
| 46 | + old_time32_t st_ctime; |
|---|
| 63 | 47 | u32 st_ctime_nsec; |
|---|
| 64 | 48 | u32 __unused4[2]; |
|---|
| 65 | 49 | }; |
|---|
| .. | .. |
|---|
| 109 | 93 | typedef u32 compat_sigset_word; |
|---|
| 110 | 94 | |
|---|
| 111 | 95 | #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 | | -} |
|---|
| 129 | 96 | |
|---|
| 130 | 97 | static inline void __user *arch_compat_alloc_user_space(long len) |
|---|
| 131 | 98 | { |
|---|