e1000: Add device IDs of blade version of the 82571 quad port
[pv_ops_mirror.git] / arch / s390 / kernel / compat_linux.h
blobe89f8c0c42a058a0ff426dd104a8117222dc13a7
1 #ifndef _ASM_S390X_S390_H
2 #define _ASM_S390X_S390_H
4 #include <linux/compat.h>
5 #include <linux/socket.h>
6 #include <linux/syscalls.h>
7 #include <linux/nfs_fs.h>
8 #include <linux/sunrpc/svc.h>
9 #include <linux/nfsd/nfsd.h>
10 #include <linux/nfsd/export.h>
12 /* Macro that masks the high order bit of an 32 bit pointer and converts it*/
13 /* to a 64 bit pointer */
14 #define A(__x) ((unsigned long)((__x) & 0x7FFFFFFFUL))
15 #define AA(__x) \
16 ((unsigned long)(__x))
18 /* Now 32bit compatibility types */
19 struct ipc_kludge_32 {
20 __u32 msgp; /* pointer */
21 __s32 msgtyp;
24 struct old_sigaction32 {
25 __u32 sa_handler; /* Really a pointer, but need to deal with 32 bits */
26 compat_old_sigset_t sa_mask; /* A 32 bit mask */
27 __u32 sa_flags;
28 __u32 sa_restorer; /* Another 32 bit pointer */
31 typedef struct compat_siginfo {
32 int si_signo;
33 int si_errno;
34 int si_code;
36 union {
37 int _pad[((128/sizeof(int)) - 3)];
39 /* kill() */
40 struct {
41 pid_t _pid; /* sender's pid */
42 uid_t _uid; /* sender's uid */
43 } _kill;
45 /* POSIX.1b timers */
46 struct {
47 compat_timer_t _tid; /* timer id */
48 int _overrun; /* overrun count */
49 compat_sigval_t _sigval; /* same as below */
50 int _sys_private; /* not to be passed to user */
51 } _timer;
53 /* POSIX.1b signals */
54 struct {
55 pid_t _pid; /* sender's pid */
56 uid_t _uid; /* sender's uid */
57 compat_sigval_t _sigval;
58 } _rt;
60 /* SIGCHLD */
61 struct {
62 pid_t _pid; /* which child */
63 uid_t _uid; /* sender's uid */
64 int _status;/* exit code */
65 compat_clock_t _utime;
66 compat_clock_t _stime;
67 } _sigchld;
69 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
70 struct {
71 __u32 _addr; /* faulting insn/memory ref. - pointer */
72 } _sigfault;
74 /* SIGPOLL */
75 struct {
76 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
77 int _fd;
78 } _sigpoll;
79 } _sifields;
80 } compat_siginfo_t;
83 * How these fields are to be accessed.
85 #define si_pid _sifields._kill._pid
86 #define si_uid _sifields._kill._uid
87 #define si_status _sifields._sigchld._status
88 #define si_utime _sifields._sigchld._utime
89 #define si_stime _sifields._sigchld._stime
90 #define si_value _sifields._rt._sigval
91 #define si_int _sifields._rt._sigval.sival_int
92 #define si_ptr _sifields._rt._sigval.sival_ptr
93 #define si_addr _sifields._sigfault._addr
94 #define si_band _sifields._sigpoll._band
95 #define si_fd _sifields._sigpoll._fd
96 #define si_tid _sifields._timer._tid
97 #define si_overrun _sifields._timer._overrun
99 /* asm/sigcontext.h */
100 typedef union
102 __u64 d;
103 __u32 f;
104 } freg_t32;
106 typedef struct
108 unsigned int fpc;
109 freg_t32 fprs[__NUM_FPRS];
110 } _s390_fp_regs32;
112 typedef struct
114 __u32 mask;
115 __u32 addr;
116 } _psw_t32 __attribute__ ((aligned(8)));
118 typedef struct
120 _psw_t32 psw;
121 __u32 gprs[__NUM_GPRS];
122 __u32 acrs[__NUM_ACRS];
123 } _s390_regs_common32;
125 typedef struct
127 _s390_regs_common32 regs;
128 _s390_fp_regs32 fpregs;
129 } _sigregs32;
131 #define _SIGCONTEXT_NSIG32 64
132 #define _SIGCONTEXT_NSIG_BPW32 32
133 #define __SIGNAL_FRAMESIZE32 96
134 #define _SIGMASK_COPY_SIZE32 (sizeof(u32)*2)
136 struct sigcontext32
138 __u32 oldmask[_COMPAT_NSIG_WORDS];
139 __u32 sregs; /* pointer */
142 /* asm/signal.h */
143 struct sigaction32 {
144 __u32 sa_handler; /* pointer */
145 __u32 sa_flags;
146 __u32 sa_restorer; /* pointer */
147 compat_sigset_t sa_mask; /* mask last for extensibility */
150 typedef struct {
151 __u32 ss_sp; /* pointer */
152 int ss_flags;
153 compat_size_t ss_size;
154 } stack_t32;
156 /* asm/ucontext.h */
157 struct ucontext32 {
158 __u32 uc_flags;
159 __u32 uc_link; /* pointer */
160 stack_t32 uc_stack;
161 _sigregs32 uc_mcontext;
162 compat_sigset_t uc_sigmask; /* mask last for extensibility */
165 #endif /* _ASM_S390X_S390_H */