1 #ifndef _ASM_PARISC_COMPAT_H
2 #define _ASM_PARISC_COMPAT_H
4 * Architecture specific compatibility types
6 #include <linux/types.h>
7 #include <linux/sched.h>
9 #define COMPAT_USER_HZ 100
11 typedef u32 compat_size_t
;
12 typedef s32 compat_ssize_t
;
13 typedef s32 compat_time_t
;
14 typedef s32 compat_clock_t
;
15 typedef s32 compat_pid_t
;
16 typedef u32 compat_uid_t
;
17 typedef u32 compat_gid_t
;
18 typedef u16 compat_mode_t
;
19 typedef u32 compat_ino_t
;
20 typedef u32 compat_dev_t
;
21 typedef s32 compat_off_t
;
22 typedef s64 compat_loff_t
;
23 typedef u16 compat_nlink_t
;
24 typedef u16 compat_ipc_pid_t
;
25 typedef s32 compat_daddr_t
;
26 typedef u32 compat_caddr_t
;
27 typedef u32 compat_timer_t
;
29 typedef s32 compat_int_t
;
30 typedef s32 compat_long_t
;
31 typedef u32 compat_uint_t
;
32 typedef u32 compat_ulong_t
;
34 struct compat_timespec
{
39 struct compat_timeval
{
45 compat_dev_t st_dev
; /* dev_t is 32 bits on parisc */
46 compat_ino_t st_ino
; /* 32 bits */
47 compat_mode_t st_mode
; /* 16 bits */
48 compat_nlink_t st_nlink
; /* 16 bits */
49 u16 st_reserved1
; /* old st_uid */
50 u16 st_reserved2
; /* old st_gid */
53 compat_time_t st_atime
;
55 compat_time_t st_mtime
;
57 compat_time_t st_ctime
;
61 u32 __unused1
; /* ACL stuff */
62 compat_dev_t __unused2
; /* network */
63 compat_ino_t __unused3
; /* network */
64 u32 __unused4
; /* cnodes */
65 u16 __unused5
; /* netsite */
67 compat_dev_t st_realdev
;
83 struct compat_flock64
{
86 compat_loff_t l_start
;
91 struct compat_statfs
{
99 __kernel_fsid_t f_fsid
;
105 struct compat_sigcontext
{
106 compat_int_t sc_flags
;
107 compat_int_t sc_gr
[32]; /* PSW in sc_gr[0] */
109 compat_int_t sc_iasq
[2];
110 compat_int_t sc_iaoq
[2];
111 compat_int_t sc_sar
; /* cr11 */
114 #define COMPAT_RLIM_INFINITY 0xffffffff
116 typedef u32 compat_old_sigset_t
; /* at least 32 bits */
118 #define _COMPAT_NSIG 64
119 #define _COMPAT_NSIG_BPW 32
121 typedef u32 compat_sigset_word
;
123 #define COMPAT_OFF_T_MAX 0x7fffffff
124 #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
127 * A pointer passed in from user mode. This should not
128 * be used for syscall parameters, just declare them
129 * as pointers because the syscall entry code will have
130 * appropriately comverted them already.
132 typedef u32 compat_uptr_t
;
134 static inline void __user
*compat_ptr(compat_uptr_t uptr
)
136 return (void __user
*)(unsigned long)uptr
;
139 static __inline__
void __user
*compat_alloc_user_space(long len
)
141 struct pt_regs
*regs
= ¤t
->thread
.regs
;
142 return (void __user
*)regs
->gr
[30];
145 #endif /* _ASM_PARISC_COMPAT_H */