aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/poll.h26
-rw-r--r--include/asm-arm/poll.h28
-rw-r--r--include/asm-arm26/poll.h22
-rw-r--r--include/asm-avr32/poll.h28
-rw-r--r--include/asm-cris/poll.h27
-rw-r--r--include/asm-frv/poll.h18
-rw-r--r--include/asm-generic/Kbuild1
-rw-r--r--include/asm-generic/audit_signal.h3
-rw-r--r--include/asm-generic/poll.h37
-rw-r--r--include/asm-h8300/poll.h18
-rw-r--r--include/asm-h8300/unistd.h66
-rw-r--r--include/asm-i386/alternative.h6
-rw-r--r--include/asm-i386/poll.h28
-rw-r--r--include/asm-i386/tsc.h6
-rw-r--r--include/asm-i386/unistd.h5
-rw-r--r--include/asm-ia64/poll.h33
-rw-r--r--include/asm-m32r/pgtable-2level.h4
-rw-r--r--include/asm-m32r/pgtable.h2
-rw-r--r--include/asm-m32r/poll.h33
-rw-r--r--include/asm-m32r/system.h11
-rw-r--r--include/asm-m68k/poll.h17
-rw-r--r--include/asm-mips/poll.h21
-rw-r--r--include/asm-parisc/poll.h28
-rw-r--r--include/asm-powerpc/hw_irq.h11
-rw-r--r--include/asm-powerpc/poll.h25
-rw-r--r--include/asm-s390/poll.h36
-rw-r--r--include/asm-sh/poll.h28
-rw-r--r--include/asm-sh64/poll.h33
-rw-r--r--include/asm-sparc/poll.h14
-rw-r--r--include/asm-sparc64/poll.h14
-rw-r--r--include/asm-um/thread_info.h2
-rw-r--r--include/asm-v850/poll.h17
-rw-r--r--include/asm-x86_64/alternative.h6
-rw-r--r--include/asm-x86_64/page.h9
-rw-r--r--include/asm-x86_64/poll.h28
-rw-r--r--include/asm-x86_64/unistd.h9
-rw-r--r--include/asm-xtensa/poll.h20
-rw-r--r--include/linux/Kbuild3
-rw-r--r--include/linux/aio.h6
-rw-r--r--include/linux/aio_abi.h18
-rw-r--r--include/linux/anon_inodes.h16
-rw-r--r--include/linux/audit.h21
-rw-r--r--include/linux/compat.h5
-rw-r--r--include/linux/eventfd.h29
-rw-r--r--include/linux/hid.h1
-rw-r--r--include/linux/init_task.h32
-rw-r--r--include/linux/interrupt.h10
-rw-r--r--include/linux/kernel.h11
-rw-r--r--include/linux/magic.h1
-rw-r--r--include/linux/module.h2
-rw-r--r--include/linux/mpage.h1
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/linux/netfilter/x_tables.h8
-rw-r--r--include/linux/netfilter_arp/arp_tables.h41
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h22
-rw-r--r--include/linux/netfilter_ipv6/ip6_tables.h22
-rw-r--r--include/linux/pid.h5
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/signal.h1
-rw-r--r--include/linux/signalfd.h97
-rw-r--r--include/linux/synclink.h24
-rw-r--r--include/linux/syscalls.h4
-rw-r--r--include/linux/task_io_accounting_ops.h28
-rw-r--r--include/linux/timerfd.h17
-rw-r--r--include/linux/tty_driver.h9
-rw-r--r--include/linux/tty_ldisc.h7
-rw-r--r--include/linux/writeback.h10
-rw-r--r--include/net/netfilter/nf_conntrack.h7
-rw-r--r--include/net/netfilter/nf_conntrack_l3proto.h3
-rw-r--r--include/net/netfilter/nf_nat_rule.h11
-rw-r--r--include/net/udp.h9
-rw-r--r--include/net/udplite.h2
-rw-r--r--include/video/atmel_lcdc.h196
-rw-r--r--include/video/pm3fb.h110
74 files changed, 830 insertions, 683 deletions
diff --git a/include/asm-alpha/poll.h b/include/asm-alpha/poll.h
index 76f89356b6a7..c98509d3149e 100644
--- a/include/asm-alpha/poll.h
+++ b/include/asm-alpha/poll.h
@@ -1,25 +1 @@
1#ifndef __ALPHA_POLL_H #include <asm-generic/poll.h>
2#define __ALPHA_POLL_H
3
4#define POLLIN (1 << 0)
5#define POLLPRI (1 << 1)
6#define POLLOUT (1 << 2)
7#define POLLERR (1 << 3)
8#define POLLHUP (1 << 4)
9#define POLLNVAL (1 << 5)
10#define POLLRDNORM (1 << 6)
11#define POLLRDBAND (1 << 7)
12#define POLLWRNORM (1 << 8)
13#define POLLWRBAND (1 << 9)
14#define POLLMSG (1 << 10)
15#define POLLREMOVE (1 << 12)
16#define POLLRDHUP (1 << 13)
17
18
19struct pollfd {
20 int fd;
21 short events;
22 short revents;
23};
24
25#endif
diff --git a/include/asm-arm/poll.h b/include/asm-arm/poll.h
index 5030b2b232a3..c98509d3149e 100644
--- a/include/asm-arm/poll.h
+++ b/include/asm-arm/poll.h
@@ -1,27 +1 @@
1#ifndef __ASMARM_POLL_H #include <asm-generic/poll.h>
2#define __ASMARM_POLL_H
3
4/* These are specified by iBCS2 */
5#define POLLIN 0x0001
6#define POLLPRI 0x0002
7#define POLLOUT 0x0004
8#define POLLERR 0x0008
9#define POLLHUP 0x0010
10#define POLLNVAL 0x0020
11
12/* The rest seem to be more-or-less nonstandard. Check them! */
13#define POLLRDNORM 0x0040
14#define POLLRDBAND 0x0080
15#define POLLWRNORM 0x0100
16#define POLLWRBAND 0x0200
17#define POLLMSG 0x0400
18#define POLLREMOVE 0x1000
19#define POLLRDHUP 0x2000
20
21struct pollfd {
22 int fd;
23 short events;
24 short revents;
25};
26
27#endif
diff --git a/include/asm-arm26/poll.h b/include/asm-arm26/poll.h
index 9ccb7f4190ca..1170e7065f6a 100644
--- a/include/asm-arm26/poll.h
+++ b/include/asm-arm26/poll.h
@@ -1,26 +1,8 @@
1#ifndef __ASMARM_POLL_H 1#ifndef __ASMARM_POLL_H
2#define __ASMARM_POLL_H 2#define __ASMARM_POLL_H
3 3
4/* These are specified by iBCS2 */ 4#include <asm-generic/poll.h>
5#define POLLIN 0x0001
6#define POLLPRI 0x0002
7#define POLLOUT 0x0004
8#define POLLERR 0x0008
9#define POLLHUP 0x0010
10#define POLLNVAL 0x0020
11 5
12/* The rest seem to be more-or-less nonstandard. Check them! */ 6#undef POLLREMOVE
13#define POLLRDNORM 0x0040
14#define POLLRDBAND 0x0080
15#define POLLWRNORM 0x0100
16#define POLLWRBAND 0x0200
17#define POLLMSG 0x0400
18#define POLLRDHUP 0x2000
19
20struct pollfd {
21 int fd;
22 short events;
23 short revents;
24};
25 7
26#endif 8#endif
diff --git a/include/asm-avr32/poll.h b/include/asm-avr32/poll.h
index 736e29755dfc..c98509d3149e 100644
--- a/include/asm-avr32/poll.h
+++ b/include/asm-avr32/poll.h
@@ -1,27 +1 @@
1#ifndef __ASM_AVR32_POLL_H #include <asm-generic/poll.h>
2#define __ASM_AVR32_POLL_H
3
4/* These are specified by iBCS2 */
5#define POLLIN 0x0001
6#define POLLPRI 0x0002
7#define POLLOUT 0x0004
8#define POLLERR 0x0008
9#define POLLHUP 0x0010
10#define POLLNVAL 0x0020
11
12/* The rest seem to be more-or-less nonstandard. Check them! */
13#define POLLRDNORM 0x0040
14#define POLLRDBAND 0x0080
15#define POLLWRNORM 0x0100
16#define POLLWRBAND 0x0200
17#define POLLMSG 0x0400
18#define POLLREMOVE 0x1000
19#define POLLRDHUP 0x2000
20
21struct pollfd {
22 int fd;
23 short events;
24 short revents;
25};
26
27#endif /* __ASM_AVR32_POLL_H */
diff --git a/include/asm-cris/poll.h b/include/asm-cris/poll.h
index 1b25d4cf498c..c98509d3149e 100644
--- a/include/asm-cris/poll.h
+++ b/include/asm-cris/poll.h
@@ -1,26 +1 @@
1#ifndef __ASM_CRIS_POLL_H #include <asm-generic/poll.h>
2#define __ASM_CRIS_POLL_H
3
4/* taken from asm-alpha */
5
6#define POLLIN 1
7#define POLLPRI 2
8#define POLLOUT 4
9#define POLLERR 8
10#define POLLHUP 16
11#define POLLNVAL 32
12#define POLLRDNORM 64
13#define POLLRDBAND 128
14#define POLLWRNORM 256
15#define POLLWRBAND 512
16#define POLLMSG 1024
17#define POLLREMOVE 4096
18#define POLLRDHUP 8192
19
20struct pollfd {
21 int fd;
22 short events;
23 short revents;
24};
25
26#endif
diff --git a/include/asm-frv/poll.h b/include/asm-frv/poll.h
index c8fe8801d075..0d01479ccc56 100644
--- a/include/asm-frv/poll.h
+++ b/include/asm-frv/poll.h
@@ -1,24 +1,12 @@
1#ifndef _ASM_POLL_H 1#ifndef _ASM_POLL_H
2#define _ASM_POLL_H 2#define _ASM_POLL_H
3 3
4#define POLLIN 1
5#define POLLPRI 2
6#define POLLOUT 4
7#define POLLERR 8
8#define POLLHUP 16
9#define POLLNVAL 32
10#define POLLRDNORM 64
11#define POLLWRNORM POLLOUT 4#define POLLWRNORM POLLOUT
12#define POLLRDBAND 128
13#define POLLWRBAND 256 5#define POLLWRBAND 256
14#define POLLMSG 0x0400
15#define POLLRDHUP 0x2000
16 6
17struct pollfd { 7#include <asm-generic/poll.h>
18 int fd; 8
19 short events; 9#undef POLLREMOVE
20 short revents;
21};
22 10
23#endif 11#endif
24 12
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
index fa14f8cd30c5..5bfeef761649 100644
--- a/include/asm-generic/Kbuild
+++ b/include/asm-generic/Kbuild
@@ -4,6 +4,7 @@ header-y += fcntl.h
4header-y += ioctl.h 4header-y += ioctl.h
5header-y += ipc.h 5header-y += ipc.h
6header-y += mman.h 6header-y += mman.h
7header-y += poll.h
7header-y += signal.h 8header-y += signal.h
8header-y += statfs.h 9header-y += statfs.h
9 10
diff --git a/include/asm-generic/audit_signal.h b/include/asm-generic/audit_signal.h
new file mode 100644
index 000000000000..6feab7f18a53
--- /dev/null
+++ b/include/asm-generic/audit_signal.h
@@ -0,0 +1,3 @@
1__NR_kill,
2__NR_tgkill,
3__NR_tkill,
diff --git a/include/asm-generic/poll.h b/include/asm-generic/poll.h
new file mode 100644
index 000000000000..44bce836d350
--- /dev/null
+++ b/include/asm-generic/poll.h
@@ -0,0 +1,37 @@
1#ifndef __ASM_GENERIC_POLL_H
2#define __ASM_GENERIC_POLL_H
3
4/* These are specified by iBCS2 */
5#define POLLIN 0x0001
6#define POLLPRI 0x0002
7#define POLLOUT 0x0004
8#define POLLERR 0x0008
9#define POLLHUP 0x0010
10#define POLLNVAL 0x0020
11
12/* The rest seem to be more-or-less nonstandard. Check them! */
13#define POLLRDNORM 0x0040
14#define POLLRDBAND 0x0080
15#ifndef POLLWRNORM
16#define POLLWRNORM 0x0100
17#endif
18#ifndef POLLWRBAND
19#define POLLWRBAND 0x0200
20#endif
21#ifndef POLLMSG
22#define POLLMSG 0x0400
23#endif
24#ifndef POLLREMOVE
25#define POLLREMOVE 0x1000
26#endif
27#ifndef POLLRDHUP
28#define POLLRDHUP 0x2000
29#endif
30
31struct pollfd {
32 int fd;
33 short events;
34 short revents;
35};
36
37#endif /* __ASM_GENERIC_POLL_H */
diff --git a/include/asm-h8300/poll.h b/include/asm-h8300/poll.h
index fc52103b276a..f61540c22d94 100644
--- a/include/asm-h8300/poll.h
+++ b/include/asm-h8300/poll.h
@@ -1,23 +1,11 @@
1#ifndef __H8300_POLL_H 1#ifndef __H8300_POLL_H
2#define __H8300_POLL_H 2#define __H8300_POLL_H
3 3
4#define POLLIN 1
5#define POLLPRI 2
6#define POLLOUT 4
7#define POLLERR 8
8#define POLLHUP 16
9#define POLLNVAL 32
10#define POLLRDNORM 64
11#define POLLWRNORM POLLOUT 4#define POLLWRNORM POLLOUT
12#define POLLRDBAND 128
13#define POLLWRBAND 256 5#define POLLWRBAND 256
14#define POLLMSG 0x0400
15#define POLLRDHUP 0x2000
16 6
17struct pollfd { 7#include <asm-generic/poll.h>
18 int fd; 8
19 short events; 9#undef POLLREMOVE
20 short revents;
21};
22 10
23#endif 11#endif
diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h
index 7ddd414f8d16..99f3c3561ecb 100644
--- a/include/asm-h8300/unistd.h
+++ b/include/asm-h8300/unistd.h
@@ -21,7 +21,7 @@
21#define __NR_time 13 21#define __NR_time 13
22#define __NR_mknod 14 22#define __NR_mknod 14
23#define __NR_chmod 15 23#define __NR_chmod 15
24#define __NR_chown 16 24#define __NR_lchown 16
25#define __NR_break 17 25#define __NR_break 17
26#define __NR_oldstat 18 26#define __NR_oldstat 18
27#define __NR_lseek 19 27#define __NR_lseek 19
@@ -115,10 +115,10 @@
115#define __NR_lstat 107 115#define __NR_lstat 107
116#define __NR_fstat 108 116#define __NR_fstat 108
117#define __NR_olduname 109 117#define __NR_olduname 109
118#define __NR_iopl /* 110 */ not supported 118#define __NR_iopl 110
119#define __NR_vhangup 111 119#define __NR_vhangup 111
120#define __NR_idle /* 112 */ Obsolete 120#define __NR_idle 112
121#define __NR_vm86 /* 113 */ not supported 121#define __NR_vm86old 113
122#define __NR_wait4 114 122#define __NR_wait4 114
123#define __NR_swapoff 115 123#define __NR_swapoff 115
124#define __NR_sysinfo 116 124#define __NR_sysinfo 116
@@ -128,7 +128,7 @@
128#define __NR_clone 120 128#define __NR_clone 120
129#define __NR_setdomainname 121 129#define __NR_setdomainname 121
130#define __NR_uname 122 130#define __NR_uname 122
131#define __NR_cacheflush 123 131#define __NR_modify_ldt 123
132#define __NR_adjtimex 124 132#define __NR_adjtimex 124
133#define __NR_mprotect 125 133#define __NR_mprotect 125
134#define __NR_sigprocmask 126 134#define __NR_sigprocmask 126
@@ -171,7 +171,7 @@
171#define __NR_mremap 163 171#define __NR_mremap 163
172#define __NR_setresuid 164 172#define __NR_setresuid 164
173#define __NR_getresuid 165 173#define __NR_getresuid 165
174#define __NR_getpagesize 166 174#define __NR_vm86 166
175#define __NR_query_module 167 175#define __NR_query_module 167
176#define __NR_poll 168 176#define __NR_poll 168
177#define __NR_nfsservctl 169 177#define __NR_nfsservctl 169
@@ -187,7 +187,7 @@
187#define __NR_rt_sigsuspend 179 187#define __NR_rt_sigsuspend 179
188#define __NR_pread64 180 188#define __NR_pread64 180
189#define __NR_pwrite64 181 189#define __NR_pwrite64 181
190#define __NR_lchown 182 190#define __NR_chown 182
191#define __NR_getcwd 183 191#define __NR_getcwd 183
192#define __NR_capget 184 192#define __NR_capget 184
193#define __NR_capset 185 193#define __NR_capset 185
@@ -203,7 +203,7 @@
203#define __NR_stat64 195 203#define __NR_stat64 195
204#define __NR_lstat64 196 204#define __NR_lstat64 196
205#define __NR_fstat64 197 205#define __NR_fstat64 197
206#define __NR_chown32 198 206#define __NR_lchown32 198
207#define __NR_getuid32 199 207#define __NR_getuid32 199
208#define __NR_getgid32 200 208#define __NR_getgid32 200
209#define __NR_geteuid32 201 209#define __NR_geteuid32 201
@@ -217,15 +217,18 @@
217#define __NR_getresuid32 209 217#define __NR_getresuid32 209
218#define __NR_setresgid32 210 218#define __NR_setresgid32 210
219#define __NR_getresgid32 211 219#define __NR_getresgid32 211
220#define __NR_lchown32 212 220#define __NR_chown32 212
221#define __NR_setuid32 213 221#define __NR_setuid32 213
222#define __NR_setgid32 214 222#define __NR_setgid32 214
223#define __NR_setfsuid32 215 223#define __NR_setfsuid32 215
224#define __NR_setfsgid32 216 224#define __NR_setfsgid32 216
225#define __NR_pivot_root 217 225#define __NR_pivot_root 217
226#define __NR_mincore 218
227#define __NR_madvise 219
228#define __NR_madvise1 219
226#define __NR_getdents64 220 229#define __NR_getdents64 220
227#define __NR_fcntl64 221 230#define __NR_fcntl64 221
228#define __NR_security 223 231/* 223 is unused */
229#define __NR_gettid 224 232#define __NR_gettid 224
230#define __NR_readahead 225 233#define __NR_readahead 225
231#define __NR_setxattr 226 234#define __NR_setxattr 226
@@ -252,13 +255,13 @@
252#define __NR_io_getevents 247 255#define __NR_io_getevents 247
253#define __NR_io_submit 248 256#define __NR_io_submit 248
254#define __NR_io_cancel 249 257#define __NR_io_cancel 249
255#define __NR_alloc_hugepages 250 258#define __NR_fadvise64 250
256#define __NR_free_hugepages 251 259/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */
257#define __NR_exit_group 252 260#define __NR_exit_group 252
258#define __NR_lookup_dcookie 253 261#define __NR_lookup_dcookie 253
259#define __NR_sys_epoll_create 254 262#define __NR_epoll_create 254
260#define __NR_sys_epoll_ctl 255 263#define __NR_epoll_ctl 255
261#define __NR_sys_epoll_wait 256 264#define __NR_epoll_wait 256
262#define __NR_remap_file_pages 257 265#define __NR_remap_file_pages 257
263#define __NR_set_tid_address 258 266#define __NR_set_tid_address 258
264#define __NR_timer_create 259 267#define __NR_timer_create 259
@@ -291,10 +294,41 @@
291#define __NR_add_key 286 294#define __NR_add_key 286
292#define __NR_request_key 287 295#define __NR_request_key 287
293#define __NR_keyctl 288 296#define __NR_keyctl 288
297#define __NR_ioprio_set 289
298#define __NR_ioprio_get 290
299#define __NR_inotify_init 291
300#define __NR_inotify_add_watch 292
301#define __NR_inotify_rm_watch 293
302#define __NR_migrate_pages 294
303#define __NR_openat 295
304#define __NR_mkdirat 296
305#define __NR_mknodat 297
306#define __NR_fchownat 298
307#define __NR_futimesat 299
308#define __NR_fstatat64 300
309#define __NR_unlinkat 301
310#define __NR_renameat 302
311#define __NR_linkat 303
312#define __NR_symlinkat 304
313#define __NR_readlinkat 305
314#define __NR_fchmodat 306
315#define __NR_faccessat 307
316#define __NR_pselect6 308
317#define __NR_ppoll 309
318#define __NR_unshare 310
319#define __NR_set_robust_list 311
320#define __NR_get_robust_list 312
321#define __NR_splice 313
322#define __NR_sync_file_range 314
323#define __NR_tee 315
324#define __NR_vmsplice 316
325#define __NR_move_pages 317
326#define __NR_getcpu 318
327#define __NR_epoll_pwait 319
294 328
295#ifdef __KERNEL__ 329#ifdef __KERNEL__
296 330
297#define NR_syscalls 289 331#define NR_syscalls 320
298 332
299#define __ARCH_WANT_IPC_PARSE_VERSION 333#define __ARCH_WANT_IPC_PARSE_VERSION
300#define __ARCH_WANT_OLD_READDIR 334#define __ARCH_WANT_OLD_READDIR
diff --git a/include/asm-i386/alternative.h b/include/asm-i386/alternative.h
index 0f70b379b029..eb7da5402bfa 100644
--- a/include/asm-i386/alternative.h
+++ b/include/asm-i386/alternative.h
@@ -98,6 +98,12 @@ static inline void alternatives_smp_switch(int smp) {}
98 ".previous" : output : [feat] "i" (feature), ##input) 98 ".previous" : output : [feat] "i" (feature), ##input)
99 99
100/* 100/*
101 * use this macro(s) if you need more than one output parameter
102 * in alternative_io
103 */
104#define ASM_OUTPUT2(a, b) a, b
105
106/*
101 * Alternative inline assembly for SMP. 107 * Alternative inline assembly for SMP.
102 * 108 *
103 * The LOCK_PREFIX macro defined here replaces the LOCK and 109 * The LOCK_PREFIX macro defined here replaces the LOCK and
diff --git a/include/asm-i386/poll.h b/include/asm-i386/poll.h
index 2cd4929abd40..c98509d3149e 100644
--- a/include/asm-i386/poll.h
+++ b/include/asm-i386/poll.h
@@ -1,27 +1 @@
1#ifndef __i386_POLL_H #include <asm-generic/poll.h>
2#define __i386_POLL_H
3
4/* These are specified by iBCS2 */
5#define POLLIN 0x0001
6#define POLLPRI 0x0002
7#define POLLOUT 0x0004
8#define POLLERR 0x0008
9#define POLLHUP 0x0010
10#define POLLNVAL 0x0020
11
12/* The rest seem to be more-or-less nonstandard. Check them! */
13#define POLLRDNORM 0x0040
14#define POLLRDBAND 0x0080
15#define POLLWRNORM 0x0100
16#define POLLWRBAND 0x0200
17#define POLLMSG 0x0400
18#define POLLREMOVE 0x1000
19#define POLLRDHUP 0x2000
20
21struct pollfd {
22 int fd;
23 short events;
24 short revents;
25};
26
27#endif
diff --git a/include/asm-i386/tsc.h b/include/asm-i386/tsc.h
index 3f3c1fa000b4..62c091ffcccc 100644
--- a/include/asm-i386/tsc.h
+++ b/include/asm-i386/tsc.h
@@ -35,14 +35,16 @@ static inline cycles_t get_cycles(void)
35static __always_inline cycles_t get_cycles_sync(void) 35static __always_inline cycles_t get_cycles_sync(void)
36{ 36{
37 unsigned long long ret; 37 unsigned long long ret;
38 unsigned eax; 38 unsigned eax, edx;
39 39
40 /* 40 /*
41 * Use RDTSCP if possible; it is guaranteed to be synchronous 41 * Use RDTSCP if possible; it is guaranteed to be synchronous
42 * and doesn't cause a VMEXIT on Hypervisors 42 * and doesn't cause a VMEXIT on Hypervisors
43 */ 43 */
44 alternative_io(ASM_NOP3, ".byte 0x0f,0x01,0xf9", X86_FEATURE_RDTSCP, 44 alternative_io(ASM_NOP3, ".byte 0x0f,0x01,0xf9", X86_FEATURE_RDTSCP,
45 "=A" (ret), "0" (0ULL) : "ecx", "memory"); 45 ASM_OUTPUT2("=a" (eax), "=d" (edx)),
46 "a" (0U), "d" (0U) : "ecx", "memory");
47 ret = (((unsigned long long)edx) << 32) | ((unsigned long long)eax);
46 if (ret) 48 if (ret)
47 return ret; 49 return ret;
48 50
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index bd21e795197c..e84ace1ec8bf 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -326,10 +326,13 @@
326#define __NR_getcpu 318 326#define __NR_getcpu 318
327#define __NR_epoll_pwait 319 327#define __NR_epoll_pwait 319
328#define __NR_utimensat 320 328#define __NR_utimensat 320
329#define __NR_signalfd 321
330#define __NR_timerfd 322
331#define __NR_eventfd 323
329 332
330#ifdef __KERNEL__ 333#ifdef __KERNEL__
331 334
332#define NR_syscalls 321 335#define NR_syscalls 324
333 336
334#define __ARCH_WANT_IPC_PARSE_VERSION 337#define __ARCH_WANT_IPC_PARSE_VERSION
335#define __ARCH_WANT_OLD_READDIR 338#define __ARCH_WANT_OLD_READDIR
diff --git a/include/asm-ia64/poll.h b/include/asm-ia64/poll.h
index bcaf9f140242..c98509d3149e 100644
--- a/include/asm-ia64/poll.h
+++ b/include/asm-ia64/poll.h
@@ -1,32 +1 @@
1#ifndef _ASM_IA64_POLL_H #include <asm-generic/poll.h>
2#define _ASM_IA64_POLL_H
3
4/*
5 * poll(2) bit definitions. Based on <asm-i386/poll.h>.
6 *
7 * Modified 1998, 1999, 2002
8 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
9 */
10
11#define POLLIN 0x0001
12#define POLLPRI 0x0002
13#define POLLOUT 0x0004
14#define POLLERR 0x0008
15#define POLLHUP 0x0010
16#define POLLNVAL 0x0020
17
18#define POLLRDNORM 0x0040
19#define POLLRDBAND 0x0080
20#define POLLWRNORM 0x0100
21#define POLLWRBAND 0x0200
22#define POLLMSG 0x0400
23#define POLLREMOVE 0x1000
24#define POLLRDHUP 0x2000
25
26struct pollfd {
27 int fd;
28 short events;
29 short revents;
30};
31
32#endif /* _ASM_IA64_POLL_H */
diff --git a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h
index 750925726a10..bca3475f9595 100644
--- a/include/asm-m32r/pgtable-2level.h
+++ b/include/asm-m32r/pgtable-2level.h
@@ -71,8 +71,8 @@ static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address)
71#define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) 71#define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
72 72
73#define PTE_FILE_MAX_BITS 29 73#define PTE_FILE_MAX_BITS 29
74#define pte_to_pgoff(pte) (((pte_val(pte) >> 2) & 0xef) | (((pte_val(pte) >> 10)) << 7)) 74#define pte_to_pgoff(pte) (((pte_val(pte) >> 2) & 0x7f) | (((pte_val(pte) >> 10)) << 7))
75#define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE }) 75#define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7f) << 2) | (((off) >> 7) << 10) | _PAGE_FILE })
76 76
77#endif /* __KERNEL__ */ 77#endif /* __KERNEL__ */
78#endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ 78#endif /* _ASM_M32R_PGTABLE_2LEVEL_H */
diff --git a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h
index 8b2a2f17e695..6604303fc47c 100644
--- a/include/asm-m32r/pgtable.h
+++ b/include/asm-m32r/pgtable.h
@@ -366,7 +366,7 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep)
366#define pte_unmap_nested(pte) do { } while (0) 366#define pte_unmap_nested(pte) do { } while (0)
367 367
368/* Encode and de-code a swap entry */ 368/* Encode and de-code a swap entry */
369#define __swp_type(x) (((x).val >> 2) & 0x3f) 369#define __swp_type(x) (((x).val >> 2) & 0x1f)
370#define __swp_offset(x) ((x).val >> 10) 370#define __swp_offset(x) ((x).val >> 10)
371#define __swp_entry(type, offset) \ 371#define __swp_entry(type, offset) \
372 ((swp_entry_t) { ((type) << 2) | ((offset) << 10) }) 372 ((swp_entry_t) { ((type) << 2) | ((offset) << 10) })
diff --git a/include/asm-m32r/poll.h b/include/asm-m32r/poll.h
index 9e0e700e727c..c98509d3149e 100644
--- a/include/asm-m32r/poll.h
+++ b/include/asm-m32r/poll.h
@@ -1,32 +1 @@
1#ifndef _ASM_M32R_POLL_H #include <asm-generic/poll.h>
2#define _ASM_M32R_POLL_H
3
4/*
5 * poll(2) bit definitions. Based on <asm-i386/poll.h>.
6 *
7 * Modified 2004
8 * Hirokazu Takata <takata at linux-m32r.org>
9 */
10
11#define POLLIN 0x0001
12#define POLLPRI 0x0002
13#define POLLOUT 0x0004
14#define POLLERR 0x0008
15#define POLLHUP 0x0010
16#define POLLNVAL 0x0020
17
18#define POLLRDNORM 0x0040
19#define POLLRDBAND 0x0080
20#define POLLWRNORM 0x0100
21#define POLLWRBAND 0x0200
22#define POLLMSG 0x0400
23#define POLLREMOVE 0x1000
24#define POLLRDHUP 0x2000
25
26struct pollfd {
27 int fd;
28 short events;
29 short revents;
30};
31
32#endif /* _ASM_M32R_POLL_H */
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h
index f62f5c9abba6..b291b2f72954 100644
--- a/include/asm-m32r/system.h
+++ b/include/asm-m32r/system.h
@@ -21,12 +21,22 @@
21 * `next' and `prev' should be struct task_struct, but it isn't always defined 21 * `next' and `prev' should be struct task_struct, but it isn't always defined
22 */ 22 */
23 23
24#if defined(CONFIG_FRAME_POINTER) || \
25 !defined(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER)
26#define M32R_PUSH_FP " push fp\n"
27#define M32R_POP_FP " pop fp\n"
28#else
29#define M32R_PUSH_FP ""
30#define M32R_POP_FP ""
31#endif
32
24#define switch_to(prev, next, last) do { \ 33#define switch_to(prev, next, last) do { \
25 __asm__ __volatile__ ( \ 34 __asm__ __volatile__ ( \
26 " seth lr, #high(1f) \n" \ 35 " seth lr, #high(1f) \n" \
27 " or3 lr, lr, #low(1f) \n" \ 36 " or3 lr, lr, #low(1f) \n" \
28 " st lr, @%4 ; store old LR \n" \ 37 " st lr, @%4 ; store old LR \n" \
29 " ld lr, @%5 ; load new LR \n" \ 38 " ld lr, @%5 ; load new LR \n" \
39 M32R_PUSH_FP \
30 " st sp, @%2 ; store old SP \n" \ 40 " st sp, @%2 ; store old SP \n" \
31 " ld sp, @%3 ; load new SP \n" \ 41 " ld sp, @%3 ; load new SP \n" \
32 " push %1 ; store `prev' on new stack \n" \ 42 " push %1 ; store `prev' on new stack \n" \
@@ -34,6 +44,7 @@
34 " .fillinsn \n" \ 44 " .fillinsn \n" \
35 "1: \n" \ 45 "1: \n" \
36 " pop %0 ; restore `__last' from new stack \n" \ 46 " pop %0 ; restore `__last' from new stack \n" \
47 M32R_POP_FP \
37 : "=r" (last) \ 48 : "=r" (last) \
38 : "0" (prev), \ 49 : "0" (prev), \
39 "r" (&(prev->thread.sp)), "r" (&(next->thread.sp)), \ 50 "r" (&(prev->thread.sp)), "r" (&(next->thread.sp)), \
diff --git a/include/asm-m68k/poll.h b/include/asm-m68k/poll.h
index 0fb8843647f8..f080fcdb61bf 100644
--- a/include/asm-m68k/poll.h
+++ b/include/asm-m68k/poll.h
@@ -1,24 +1,9 @@
1#ifndef __m68k_POLL_H 1#ifndef __m68k_POLL_H
2#define __m68k_POLL_H 2#define __m68k_POLL_H
3 3
4#define POLLIN 1
5#define POLLPRI 2
6#define POLLOUT 4
7#define POLLERR 8
8#define POLLHUP 16
9#define POLLNVAL 32
10#define POLLRDNORM 64
11#define POLLWRNORM POLLOUT 4#define POLLWRNORM POLLOUT
12#define POLLRDBAND 128
13#define POLLWRBAND 256 5#define POLLWRBAND 256
14#define POLLMSG 0x0400
15#define POLLREMOVE 0x1000
16#define POLLRDHUP 0x2000
17 6
18struct pollfd { 7#include <asm-generic/poll.h>
19 int fd;
20 short events;
21 short revents;
22};
23 8
24#endif 9#endif
diff --git a/include/asm-mips/poll.h b/include/asm-mips/poll.h
index 70881f8c5c50..47b952080431 100644
--- a/include/asm-mips/poll.h
+++ b/include/asm-mips/poll.h
@@ -1,28 +1,9 @@
1#ifndef __ASM_POLL_H 1#ifndef __ASM_POLL_H
2#define __ASM_POLL_H 2#define __ASM_POLL_H
3 3
4#define POLLIN 0x0001
5#define POLLPRI 0x0002
6#define POLLOUT 0x0004
7
8#define POLLERR 0x0008
9#define POLLHUP 0x0010
10#define POLLNVAL 0x0020
11
12#define POLLRDNORM 0x0040
13#define POLLRDBAND 0x0080
14#define POLLWRNORM POLLOUT 4#define POLLWRNORM POLLOUT
15#define POLLWRBAND 0x0100 5#define POLLWRBAND 0x0100
16 6
17/* These seem to be more or less nonstandard ... */ 7#include <asm-generic/poll.h>
18#define POLLMSG 0x0400
19#define POLLREMOVE 0x1000
20#define POLLRDHUP 0x2000
21
22struct pollfd {
23 int fd;
24 short events;
25 short revents;
26};
27 8
28#endif /* __ASM_POLL_H */ 9#endif /* __ASM_POLL_H */
diff --git a/include/asm-parisc/poll.h b/include/asm-parisc/poll.h
index 20e4d03c74cb..c98509d3149e 100644
--- a/include/asm-parisc/poll.h
+++ b/include/asm-parisc/poll.h
@@ -1,27 +1 @@
1#ifndef __PARISC_POLL_H #include <asm-generic/poll.h>
2#define __PARISC_POLL_H
3
4/* These are specified by iBCS2 */
5#define POLLIN 0x0001
6#define POLLPRI 0x0002
7#define POLLOUT 0x0004
8#define POLLERR 0x0008
9#define POLLHUP 0x0010
10#define POLLNVAL 0x0020
11
12/* The rest seem to be more-or-less nonstandard. Check them! */
13#define POLLRDNORM 0x0040
14#define POLLRDBAND 0x0080
15#define POLLWRNORM 0x0100
16#define POLLWRBAND 0x0200
17#define POLLMSG 0x0400
18#define POLLREMOVE 0x1000
19#define POLLRDHUP 0x2000
20
21struct pollfd {
22 int fd;
23 short events;
24 short revents;
25};
26
27#endif
diff --git a/include/asm-powerpc/hw_irq.h b/include/asm-powerpc/hw_irq.h
index 9e4dd98eb220..a7b60bf639e0 100644
--- a/include/asm-powerpc/hw_irq.h
+++ b/include/asm-powerpc/hw_irq.h
@@ -48,8 +48,15 @@ extern void iseries_handle_interrupts(void);
48 48
49#define irqs_disabled() (local_get_flags() == 0) 49#define irqs_disabled() (local_get_flags() == 0)
50 50
51#define hard_irq_enable() __mtmsrd(mfmsr() | MSR_EE, 1) 51#define __hard_irq_enable() __mtmsrd(mfmsr() | MSR_EE, 1)
52#define hard_irq_disable() __mtmsrd(mfmsr() & ~MSR_EE, 1) 52#define __hard_irq_disable() __mtmsrd(mfmsr() & ~MSR_EE, 1)
53
54#define hard_irq_disable() \
55 do { \
56 __hard_irq_disable(); \
57 get_paca()->soft_enabled = 0; \
58 get_paca()->hard_enabled = 0; \
59 } while(0)
53 60
54#else 61#else
55 62
diff --git a/include/asm-powerpc/poll.h b/include/asm-powerpc/poll.h
index 9c7d12631033..c98509d3149e 100644
--- a/include/asm-powerpc/poll.h
+++ b/include/asm-powerpc/poll.h
@@ -1,24 +1 @@
1#ifndef _ASM_POWERPC_POLL_H #include <asm-generic/poll.h>
2#define _ASM_POWERPC_POLL_H
3
4#define POLLIN 0x0001
5#define POLLPRI 0x0002
6#define POLLOUT 0x0004
7#define POLLERR 0x0008
8#define POLLHUP 0x0010
9#define POLLNVAL 0x0020
10#define POLLRDNORM 0x0040
11#define POLLRDBAND 0x0080
12#define POLLWRNORM 0x0100
13#define POLLWRBAND 0x0200
14#define POLLMSG 0x0400
15#define POLLREMOVE 0x1000
16#define POLLRDHUP 0x2000
17
18struct pollfd {
19 int fd;
20 short events;
21 short revents;
22};
23
24#endif /* _ASM_POWERPC_POLL_H */
diff --git a/include/asm-s390/poll.h b/include/asm-s390/poll.h
index 6f7f65ac7d27..c98509d3149e 100644
--- a/include/asm-s390/poll.h
+++ b/include/asm-s390/poll.h
@@ -1,35 +1 @@
1/* #include <asm-generic/poll.h>
2 * include/asm-s390/poll.h
3 *
4 * S390 version
5 *
6 * Derived from "include/asm-i386/poll.h"
7 */
8
9#ifndef __S390_POLL_H
10#define __S390_POLL_H
11
12/* These are specified by iBCS2 */
13#define POLLIN 0x0001
14#define POLLPRI 0x0002
15#define POLLOUT 0x0004
16#define POLLERR 0x0008
17#define POLLHUP 0x0010
18#define POLLNVAL 0x0020
19
20/* The rest seem to be more-or-less nonstandard. Check them! */
21#define POLLRDNORM 0x0040
22#define POLLRDBAND 0x0080
23#define POLLWRNORM 0x0100
24#define POLLWRBAND 0x0200
25#define POLLMSG 0x0400
26#define POLLREMOVE 0x1000
27#define POLLRDHUP 0x2000
28
29struct pollfd {
30 int fd;
31 short events;
32 short revents;
33};
34
35#endif
diff --git a/include/asm-sh/poll.h b/include/asm-sh/poll.h
index dbca9b32f4a6..c98509d3149e 100644
--- a/include/asm-sh/poll.h
+++ b/include/asm-sh/poll.h
@@ -1,27 +1 @@
1#ifndef __ASM_SH_POLL_H #include <asm-generic/poll.h>
2#define __ASM_SH_POLL_H
3
4/* These are specified by iBCS2 */
5#define POLLIN 0x0001
6#define POLLPRI 0x0002
7#define POLLOUT 0x0004
8#define POLLERR 0x0008
9#define POLLHUP 0x0010
10#define POLLNVAL 0x0020
11
12/* The rest seem to be more-or-less nonstandard. Check them! */
13#define POLLRDNORM 0x0040
14#define POLLRDBAND 0x0080
15#define POLLWRNORM 0x0100
16#define POLLWRBAND 0x0200
17#define POLLMSG 0x0400
18#define POLLREMOVE 0x1000
19#define POLLRDHUP 0x2000
20
21struct pollfd {
22 int fd;
23 short events;
24 short revents;
25};
26
27#endif /* __ASM_SH_POLL_H */
diff --git a/include/asm-sh64/poll.h b/include/asm-sh64/poll.h
index 3a6cbad08d28..ca2950267c53 100644
--- a/include/asm-sh64/poll.h
+++ b/include/asm-sh64/poll.h
@@ -1,37 +1,8 @@
1#ifndef __ASM_SH64_POLL_H 1#ifndef __ASM_SH64_POLL_H
2#define __ASM_SH64_POLL_H 2#define __ASM_SH64_POLL_H
3 3
4/* 4#include <asm-generic/poll.h>
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file "COPYING" in the main directory of this archive
7 * for more details.
8 *
9 * include/asm-sh64/poll.h
10 *
11 * Copyright (C) 2000, 2001 Paolo Alberelli
12 *
13 */
14 5
15/* These are specified by iBCS2 */ 6#undef POLLREMOVE
16#define POLLIN 0x0001
17#define POLLPRI 0x0002
18#define POLLOUT 0x0004
19#define POLLERR 0x0008
20#define POLLHUP 0x0010
21#define POLLNVAL 0x0020
22
23/* The rest seem to be more-or-less nonstandard. Check them! */
24#define POLLRDNORM 0x0040
25#define POLLRDBAND 0x0080
26#define POLLWRNORM 0x0100
27#define POLLWRBAND 0x0200
28#define POLLMSG 0x0400
29#define POLLRDHUP 0x2000
30
31struct pollfd {
32 int fd;
33 short events;
34 short revents;
35};
36 7
37#endif /* __ASM_SH64_POLL_H */ 8#endif /* __ASM_SH64_POLL_H */
diff --git a/include/asm-sparc/poll.h b/include/asm-sparc/poll.h
index 26f13fb35497..091d3ad2e830 100644
--- a/include/asm-sparc/poll.h
+++ b/include/asm-sparc/poll.h
@@ -1,24 +1,12 @@
1#ifndef __SPARC_POLL_H 1#ifndef __SPARC_POLL_H
2#define __SPARC_POLL_H 2#define __SPARC_POLL_H
3 3
4#define POLLIN 1
5#define POLLPRI 2
6#define POLLOUT 4
7#define POLLERR 8
8#define POLLHUP 16
9#define POLLNVAL 32
10#define POLLRDNORM 64
11#define POLLWRNORM POLLOUT 4#define POLLWRNORM POLLOUT
12#define POLLRDBAND 128
13#define POLLWRBAND 256 5#define POLLWRBAND 256
14#define POLLMSG 512 6#define POLLMSG 512
15#define POLLREMOVE 1024 7#define POLLREMOVE 1024
16#define POLLRDHUP 2048 8#define POLLRDHUP 2048
17 9
18struct pollfd { 10#include <asm-generic/poll.h>
19 int fd;
20 short events;
21 short revents;
22};
23 11
24#endif 12#endif
diff --git a/include/asm-sparc64/poll.h b/include/asm-sparc64/poll.h
index ab6b0d1bb4ad..ebeeb3816c40 100644
--- a/include/asm-sparc64/poll.h
+++ b/include/asm-sparc64/poll.h
@@ -1,24 +1,12 @@
1#ifndef __SPARC64_POLL_H 1#ifndef __SPARC64_POLL_H
2#define __SPARC64_POLL_H 2#define __SPARC64_POLL_H
3 3
4#define POLLIN 1
5#define POLLPRI 2
6#define POLLOUT 4
7#define POLLERR 8
8#define POLLHUP 16
9#define POLLNVAL 32
10#define POLLRDNORM 64
11#define POLLWRNORM POLLOUT 4#define POLLWRNORM POLLOUT
12#define POLLRDBAND 128
13#define POLLWRBAND 256 5#define POLLWRBAND 256
14#define POLLMSG 512 6#define POLLMSG 512
15#define POLLREMOVE 1024 7#define POLLREMOVE 1024
16#define POLLRDHUP 2048 8#define POLLRDHUP 2048
17 9
18struct pollfd { 10#include <asm-generic/poll.h>
19 int fd;
20 short events;
21 short revents;
22};
23 11
24#endif 12#endif
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h
index 261e2f4528f6..18a13ba74605 100644
--- a/include/asm-um/thread_info.h
+++ b/include/asm-um/thread_info.h
@@ -22,6 +22,7 @@ struct thread_info {
22 0-0xBFFFFFFF for user 22 0-0xBFFFFFFF for user
23 0-0xFFFFFFFF for kernel */ 23 0-0xFFFFFFFF for kernel */
24 struct restart_block restart_block; 24 struct restart_block restart_block;
25 struct thread_info *real_thread; /* Points to non-IRQ stack */
25}; 26};
26 27
27#define INIT_THREAD_INFO(tsk) \ 28#define INIT_THREAD_INFO(tsk) \
@@ -35,6 +36,7 @@ struct thread_info {
35 .restart_block = { \ 36 .restart_block = { \
36 .fn = do_no_restart_syscall, \ 37 .fn = do_no_restart_syscall, \
37 }, \ 38 }, \
39 .real_thread = NULL, \
38} 40}
39 41
40#define init_thread_info (init_thread_union.thread_info) 42#define init_thread_info (init_thread_union.thread_info)
diff --git a/include/asm-v850/poll.h b/include/asm-v850/poll.h
index c10176c2c28f..803cad0b9b59 100644
--- a/include/asm-v850/poll.h
+++ b/include/asm-v850/poll.h
@@ -1,24 +1,9 @@
1#ifndef __V850_POLL_H__ 1#ifndef __V850_POLL_H__
2#define __V850_POLL_H__ 2#define __V850_POLL_H__
3 3
4#define POLLIN 0x0001
5#define POLLPRI 0x0002
6#define POLLOUT 0x0004
7#define POLLERR 0x0008
8#define POLLHUP 0x0010
9#define POLLNVAL 0x0020
10#define POLLRDNORM 0x0040
11#define POLLWRNORM POLLOUT 4#define POLLWRNORM POLLOUT
12#define POLLRDBAND 0x0080
13#define POLLWRBAND 0x0100 5#define POLLWRBAND 0x0100
14#define POLLMSG 0x0400
15#define POLLREMOVE 0x1000
16#define POLLRDHUP 0x2000
17 6
18struct pollfd { 7#include <asm-generic/poll.h>
19 int fd;
20 short events;
21 short revents;
22};
23 8
24#endif /* __V850_POLL_H__ */ 9#endif /* __V850_POLL_H__ */
diff --git a/include/asm-x86_64/alternative.h b/include/asm-x86_64/alternative.h
index a09fe85c268e..a09427640764 100644
--- a/include/asm-x86_64/alternative.h
+++ b/include/asm-x86_64/alternative.h
@@ -103,6 +103,12 @@ static inline void alternatives_smp_switch(int smp) {}
103 ".previous" : output : [feat] "i" (feature), ##input) 103 ".previous" : output : [feat] "i" (feature), ##input)
104 104
105/* 105/*
106 * use this macro(s) if you need more than one output parameter
107 * in alternative_io
108 */
109#define ASM_OUTPUT2(a, b) a, b
110
111/*
106 * Alternative inline assembly for SMP. 112 * Alternative inline assembly for SMP.
107 * 113 *
108 * The LOCK_PREFIX macro defined here replaces the LOCK and 114 * The LOCK_PREFIX macro defined here replaces the LOCK and
diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h
index dee632fa457d..e327c830da0c 100644
--- a/include/asm-x86_64/page.h
+++ b/include/asm-x86_64/page.h
@@ -80,6 +80,15 @@ extern unsigned long phys_base;
80#define __PHYSICAL_START CONFIG_PHYSICAL_START 80#define __PHYSICAL_START CONFIG_PHYSICAL_START
81#define __KERNEL_ALIGN 0x200000 81#define __KERNEL_ALIGN 0x200000
82 82
83/*
84 * Make sure kernel is aligned to 2MB address. Catching it at compile
85 * time is better. Change your config file and compile the kernel
86 * for a 2MB aligned address (CONFIG_PHYSICAL_START)
87 */
88#if (CONFIG_PHYSICAL_START % __KERNEL_ALIGN) != 0
89#error "CONFIG_PHYSICAL_START must be a multiple of 2MB"
90#endif
91
83#define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START) 92#define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START)
84#define __START_KERNEL_map _AC(0xffffffff80000000, UL) 93#define __START_KERNEL_map _AC(0xffffffff80000000, UL)
85#define __PAGE_OFFSET _AC(0xffff810000000000, UL) 94#define __PAGE_OFFSET _AC(0xffff810000000000, UL)
diff --git a/include/asm-x86_64/poll.h b/include/asm-x86_64/poll.h
index c0475a9d8bb8..c98509d3149e 100644
--- a/include/asm-x86_64/poll.h
+++ b/include/asm-x86_64/poll.h
@@ -1,27 +1 @@
1#ifndef __x86_64_POLL_H #include <asm-generic/poll.h>
2#define __x86_64_POLL_H
3
4/* These are specified by iBCS2 */
5#define POLLIN 0x0001
6#define POLLPRI 0x0002
7#define POLLOUT 0x0004
8#define POLLERR 0x0008
9#define POLLHUP 0x0010
10#define POLLNVAL 0x0020
11
12/* The rest seem to be more-or-less nonstandard. Check them! */
13#define POLLRDNORM 0x0040
14#define POLLRDBAND 0x0080
15#define POLLWRNORM 0x0100
16#define POLLWRBAND 0x0200
17#define POLLMSG 0x0400
18#define POLLREMOVE 0x1000
19#define POLLRDHUP 0x2000
20
21struct pollfd {
22 int fd;
23 short events;
24 short revents;
25};
26
27#endif
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
index 595703949df3..ae1ed05f2814 100644
--- a/include/asm-x86_64/unistd.h
+++ b/include/asm-x86_64/unistd.h
@@ -621,6 +621,15 @@ __SYSCALL(__NR_vmsplice, sys_vmsplice)
621__SYSCALL(__NR_move_pages, sys_move_pages) 621__SYSCALL(__NR_move_pages, sys_move_pages)
622#define __NR_utimensat 280 622#define __NR_utimensat 280
623__SYSCALL(__NR_utimensat, sys_utimensat) 623__SYSCALL(__NR_utimensat, sys_utimensat)
624#define __IGNORE_getcpu /* implemented as a vsyscall */
625#define __NR_epoll_pwait 281
626__SYSCALL(__NR_epoll_pwait, sys_epoll_pwait)
627#define __NR_signalfd 282
628__SYSCALL(__NR_signalfd, sys_signalfd)
629#define __NR_timerfd 282
630__SYSCALL(__NR_timerfd, sys_timerfd)
631#define __NR_eventfd 283
632__SYSCALL(__NR_eventfd, sys_eventfd)
624 633
625#ifndef __NO_STUBS 634#ifndef __NO_STUBS
626#define __ARCH_WANT_OLD_READDIR 635#define __ARCH_WANT_OLD_READDIR
diff --git a/include/asm-xtensa/poll.h b/include/asm-xtensa/poll.h
index 6fd94773e866..9d2d5993f068 100644
--- a/include/asm-xtensa/poll.h
+++ b/include/asm-xtensa/poll.h
@@ -11,28 +11,10 @@
11#ifndef _XTENSA_POLL_H 11#ifndef _XTENSA_POLL_H
12#define _XTENSA_POLL_H 12#define _XTENSA_POLL_H
13 13
14
15#define POLLIN 0x0001
16#define POLLPRI 0x0002
17#define POLLOUT 0x0004
18
19#define POLLERR 0x0008
20#define POLLHUP 0x0010
21#define POLLNVAL 0x0020
22
23#define POLLRDNORM 0x0040
24#define POLLRDBAND 0x0080
25#define POLLWRNORM POLLOUT 14#define POLLWRNORM POLLOUT
26#define POLLWRBAND 0x0100 15#define POLLWRBAND 0x0100
27
28#define POLLMSG 0x0400
29#define POLLREMOVE 0x0800 16#define POLLREMOVE 0x0800
30#define POLLRDHUP 0x2000
31 17
32struct pollfd { 18#include <asm-generic/poll.h>
33 int fd;
34 short events;
35 short revents;
36};
37 19
38#endif /* _XTENSA_POLL_H */ 20#endif /* _XTENSA_POLL_H */
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 94cc04a143f2..bcd01f269f60 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -140,7 +140,6 @@ header-y += snmp.h
140header-y += sockios.h 140header-y += sockios.h
141header-y += som.h 141header-y += som.h
142header-y += sound.h 142header-y += sound.h
143header-y += synclink.h
144header-y += taskstats.h 143header-y += taskstats.h
145header-y += telephony.h 144header-y += telephony.h
146header-y += termios.h 145header-y += termios.h
@@ -191,6 +190,7 @@ unifdef-y += errno.h
191unifdef-y += errqueue.h 190unifdef-y += errqueue.h
192unifdef-y += ethtool.h 191unifdef-y += ethtool.h
193unifdef-y += eventpoll.h 192unifdef-y += eventpoll.h
193unifdef-y += signalfd.h
194unifdef-y += ext2_fs.h 194unifdef-y += ext2_fs.h
195unifdef-y += ext3_fs.h 195unifdef-y += ext3_fs.h
196unifdef-y += fb.h 196unifdef-y += fb.h
@@ -320,6 +320,7 @@ unifdef-y += sonypi.h
320unifdef-y += soundcard.h 320unifdef-y += soundcard.h
321unifdef-y += stat.h 321unifdef-y += stat.h
322unifdef-y += stddef.h 322unifdef-y += stddef.h
323unifdef-y += synclink.h
323unifdef-y += sysctl.h 324unifdef-y += sysctl.h
324unifdef-y += tcp.h 325unifdef-y += tcp.h
325unifdef-y += time.h 326unifdef-y += time.h
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 43dc2ebfaa0e..b903fc02bdb7 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -119,6 +119,12 @@ struct kiocb {
119 119
120 struct list_head ki_list; /* the aio core uses this 120 struct list_head ki_list; /* the aio core uses this
121 * for cancellation */ 121 * for cancellation */
122
123 /*
124 * If the aio_resfd field of the userspace iocb is not zero,
125 * this is the underlying file* to deliver event to.
126 */
127 struct file *ki_eventfd;
122}; 128};
123 129
124#define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) 130#define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY)
diff --git a/include/linux/aio_abi.h b/include/linux/aio_abi.h
index e3ca0a485cc6..9e0172931315 100644
--- a/include/linux/aio_abi.h
+++ b/include/linux/aio_abi.h
@@ -45,6 +45,14 @@ enum {
45 IOCB_CMD_PWRITEV = 8, 45 IOCB_CMD_PWRITEV = 8,
46}; 46};
47 47
48/*
49 * Valid flags for the "aio_flags" member of the "struct iocb".
50 *
51 * IOCB_FLAG_RESFD - Set if the "aio_resfd" member of the "struct iocb"
52 * is valid.
53 */
54#define IOCB_FLAG_RESFD (1 << 0)
55
48/* read() from /dev/aio returns these structures. */ 56/* read() from /dev/aio returns these structures. */
49struct io_event { 57struct io_event {
50 __u64 data; /* the data field from the iocb */ 58 __u64 data; /* the data field from the iocb */
@@ -84,7 +92,15 @@ struct iocb {
84 92
85 /* extra parameters */ 93 /* extra parameters */
86 __u64 aio_reserved2; /* TODO: use this for a (struct sigevent *) */ 94 __u64 aio_reserved2; /* TODO: use this for a (struct sigevent *) */
87 __u64 aio_reserved3; 95
96 /* flags for the "struct iocb" */
97 __u32 aio_flags;
98
99 /*
100 * if the IOCB_FLAG_RESFD flag of "aio_flags" is set, this is an
101 * eventfd to signal AIO readiness to
102 */
103 __u32 aio_resfd;
88}; /* 64 bytes */ 104}; /* 64 bytes */
89 105
90#undef IFBIG 106#undef IFBIG
diff --git a/include/linux/anon_inodes.h b/include/linux/anon_inodes.h
new file mode 100644
index 000000000000..b2e1ba325b9a
--- /dev/null
+++ b/include/linux/anon_inodes.h
@@ -0,0 +1,16 @@
1/*
2 * include/linux/anon_inodes.h
3 *
4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
5 *
6 */
7
8#ifndef _LINUX_ANON_INODES_H
9#define _LINUX_ANON_INODES_H
10
11int anon_inode_getfd(int *pfd, struct inode **pinode, struct file **pfile,
12 const char *name, const struct file_operations *fops,
13 void *priv);
14
15#endif /* _LINUX_ANON_INODES_H */
16
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 773e30df11ee..fccc6e50298a 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -91,6 +91,7 @@
91#define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */ 91#define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */
92#define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ 92#define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */
93#define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ 93#define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */
94#define AUDIT_OBJ_PID 1318 /* ptrace target */
94 95
95#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ 96#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
96#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ 97#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
@@ -111,6 +112,7 @@
111#define AUDIT_FIRST_KERN_ANOM_MSG 1700 112#define AUDIT_FIRST_KERN_ANOM_MSG 1700
112#define AUDIT_LAST_KERN_ANOM_MSG 1799 113#define AUDIT_LAST_KERN_ANOM_MSG 1799
113#define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ 114#define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
115#define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */
114 116
115#define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ 117#define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */
116 118
@@ -148,6 +150,8 @@
148#define AUDIT_CLASS_READ_32 5 150#define AUDIT_CLASS_READ_32 5
149#define AUDIT_CLASS_WRITE 6 151#define AUDIT_CLASS_WRITE 6
150#define AUDIT_CLASS_WRITE_32 7 152#define AUDIT_CLASS_WRITE_32 7
153#define AUDIT_CLASS_SIGNAL 8
154#define AUDIT_CLASS_SIGNAL_32 9
151 155
152/* This bitmask is used to validate user input. It represents all bits that 156/* This bitmask is used to validate user input. It represents all bits that
153 * are currently used in an audit field constant understood by the kernel. 157 * are currently used in an audit field constant understood by the kernel.
@@ -337,6 +341,7 @@ struct mqstat;
337#define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) 341#define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS )
338extern int __init audit_register_class(int class, unsigned *list); 342extern int __init audit_register_class(int class, unsigned *list);
339extern int audit_classify_syscall(int abi, unsigned syscall); 343extern int audit_classify_syscall(int abi, unsigned syscall);
344extern int audit_classify_arch(int arch);
340#ifdef CONFIG_AUDITSYSCALL 345#ifdef CONFIG_AUDITSYSCALL
341/* These are defined in auditsc.c */ 346/* These are defined in auditsc.c */
342 /* Public API */ 347 /* Public API */
@@ -351,7 +356,8 @@ extern void audit_putname(const char *name);
351extern void __audit_inode(const char *name, const struct inode *inode); 356extern void __audit_inode(const char *name, const struct inode *inode);
352extern void __audit_inode_child(const char *dname, const struct inode *inode, 357extern void __audit_inode_child(const char *dname, const struct inode *inode,
353 const struct inode *parent); 358 const struct inode *parent);
354extern void __audit_inode_update(const struct inode *inode); 359extern void __audit_ptrace(struct task_struct *t);
360
355static inline int audit_dummy_context(void) 361static inline int audit_dummy_context(void)
356{ 362{
357 void *p = current->audit_context; 363 void *p = current->audit_context;
@@ -372,9 +378,12 @@ static inline void audit_inode_child(const char *dname,
372 if (unlikely(!audit_dummy_context())) 378 if (unlikely(!audit_dummy_context()))
373 __audit_inode_child(dname, inode, parent); 379 __audit_inode_child(dname, inode, parent);
374} 380}
375static inline void audit_inode_update(const struct inode *inode) { 381void audit_core_dumps(long signr);
382
383static inline void audit_ptrace(struct task_struct *t)
384{
376 if (unlikely(!audit_dummy_context())) 385 if (unlikely(!audit_dummy_context()))
377 __audit_inode_update(inode); 386 __audit_ptrace(t);
378} 387}
379 388
380 /* Private API (for audit.c only) */ 389 /* Private API (for audit.c only) */
@@ -447,6 +456,7 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
447 return 0; 456 return 0;
448} 457}
449extern int audit_n_rules; 458extern int audit_n_rules;
459extern int audit_signals;
450#else 460#else
451#define audit_alloc(t) ({ 0; }) 461#define audit_alloc(t) ({ 0; })
452#define audit_free(t) do { ; } while (0) 462#define audit_free(t) do { ; } while (0)
@@ -457,10 +467,9 @@ extern int audit_n_rules;
457#define audit_putname(n) do { ; } while (0) 467#define audit_putname(n) do { ; } while (0)
458#define __audit_inode(n,i) do { ; } while (0) 468#define __audit_inode(n,i) do { ; } while (0)
459#define __audit_inode_child(d,i,p) do { ; } while (0) 469#define __audit_inode_child(d,i,p) do { ; } while (0)
460#define __audit_inode_update(i) do { ; } while (0)
461#define audit_inode(n,i) do { ; } while (0) 470#define audit_inode(n,i) do { ; } while (0)
462#define audit_inode_child(d,i,p) do { ; } while (0) 471#define audit_inode_child(d,i,p) do { ; } while (0)
463#define audit_inode_update(i) do { ; } while (0) 472#define audit_core_dumps(i) do { ; } while (0)
464#define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) 473#define auditsc_get_stamp(c,t,s) do { BUG(); } while (0)
465#define audit_get_loginuid(c) ({ -1; }) 474#define audit_get_loginuid(c) ({ -1; })
466#define audit_log_task_context(b) do { ; } while (0) 475#define audit_log_task_context(b) do { ; } while (0)
@@ -477,7 +486,9 @@ extern int audit_n_rules;
477#define audit_mq_timedreceive(d,l,p,t) ({ 0; }) 486#define audit_mq_timedreceive(d,l,p,t) ({ 0; })
478#define audit_mq_notify(d,n) ({ 0; }) 487#define audit_mq_notify(d,n) ({ 0; })
479#define audit_mq_getsetattr(d,s) ({ 0; }) 488#define audit_mq_getsetattr(d,s) ({ 0; })
489#define audit_ptrace(t) ((void)0)
480#define audit_n_rules 0 490#define audit_n_rules 0
491#define audit_signals 0
481#endif 492#endif
482 493
483#ifdef CONFIG_AUDIT 494#ifdef CONFIG_AUDIT
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 70a157a130bb..636502c02734 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -225,6 +225,11 @@ static inline int compat_timespec_compare(struct compat_timespec *lhs,
225 return lhs->tv_nsec - rhs->tv_nsec; 225 return lhs->tv_nsec - rhs->tv_nsec;
226} 226}
227 227
228extern int get_compat_itimerspec(struct itimerspec *dst,
229 const struct compat_itimerspec __user *src);
230extern int put_compat_itimerspec(struct compat_itimerspec __user *dst,
231 const struct itimerspec *src);
232
228asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); 233asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
229 234
230extern int compat_printk(const char *fmt, ...); 235extern int compat_printk(const char *fmt, ...);
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h
new file mode 100644
index 000000000000..0d6ecc60b94d
--- /dev/null
+++ b/include/linux/eventfd.h
@@ -0,0 +1,29 @@
1/*
2 * include/linux/eventfd.h
3 *
4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
5 *
6 */
7
8#ifndef _LINUX_EVENTFD_H
9#define _LINUX_EVENTFD_H
10
11
12#ifdef __KERNEL__
13
14#ifdef CONFIG_EVENTFD
15
16struct file *eventfd_fget(int fd);
17int eventfd_signal(struct file *file, int n);
18
19#else /* CONFIG_EVENTFD */
20
21#define eventfd_fget(fd) ERR_PTR(-ENOSYS)
22#define eventfd_signal(f, n) 0
23
24#endif /* CONFIG_EVENTFD */
25
26#endif /* __KERNEL__ */
27
28#endif /* _LINUX_EVENTFD_H */
29
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 37076b116ed0..827ee748fd4c 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -275,6 +275,7 @@ struct hid_item {
275#define HID_QUIRK_LOGITECH_DESCRIPTOR 0x00100000 275#define HID_QUIRK_LOGITECH_DESCRIPTOR 0x00100000
276#define HID_QUIRK_DUPLICATE_USAGES 0x00200000 276#define HID_QUIRK_DUPLICATE_USAGES 0x00200000
277#define HID_QUIRK_RESET_LEDS 0x00400000 277#define HID_QUIRK_RESET_LEDS 0x00400000
278#define HID_QUIRK_SWAPPED_MIN_MAX 0x00800000
278 279
279/* 280/*
280 * This is the global environment of the parser. This information is 281 * This is the global environment of the parser. This information is
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 45170b2fa253..276ccaa2670c 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -65,9 +65,9 @@
65 .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ 65 .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \
66 .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ 66 .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \
67 .rlim = INIT_RLIMITS, \ 67 .rlim = INIT_RLIMITS, \
68 .pgrp = 1, \ 68 .pgrp = 0, \
69 .tty_old_pgrp = NULL, \ 69 .tty_old_pgrp = NULL, \
70 { .__session = 1}, \ 70 { .__session = 0}, \
71} 71}
72 72
73extern struct nsproxy init_nsproxy; 73extern struct nsproxy init_nsproxy;
@@ -84,10 +84,33 @@ extern struct nsproxy init_nsproxy;
84 .count = ATOMIC_INIT(1), \ 84 .count = ATOMIC_INIT(1), \
85 .action = { { { .sa_handler = NULL, } }, }, \ 85 .action = { { { .sa_handler = NULL, } }, }, \
86 .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ 86 .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \
87 .signalfd_list = LIST_HEAD_INIT(sighand.signalfd_list), \
87} 88}
88 89
89extern struct group_info init_groups; 90extern struct group_info init_groups;
90 91
92#define INIT_STRUCT_PID { \
93 .count = ATOMIC_INIT(1), \
94 .nr = 0, \
95 /* Don't put this struct pid in pid_hash */ \
96 .pid_chain = { .next = NULL, .pprev = NULL }, \
97 .tasks = { \
98 { .first = &init_task.pids[PIDTYPE_PID].node }, \
99 { .first = &init_task.pids[PIDTYPE_PGID].node }, \
100 { .first = &init_task.pids[PIDTYPE_SID].node }, \
101 }, \
102 .rcu = RCU_HEAD_INIT, \
103}
104
105#define INIT_PID_LINK(type) \
106{ \
107 .node = { \
108 .next = NULL, \
109 .pprev = &init_struct_pid.tasks[type].first, \
110 }, \
111 .pid = &init_struct_pid, \
112}
113
91/* 114/*
92 * INIT_TASK is used to set up the first task table, touch at 115 * INIT_TASK is used to set up the first task table, touch at
93 * your own risk!. Base=0, limit=0x1fffff (=2MB) 116 * your own risk!. Base=0, limit=0x1fffff (=2MB)
@@ -139,6 +162,11 @@ extern struct group_info init_groups;
139 .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ 162 .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \
140 .fs_excl = ATOMIC_INIT(0), \ 163 .fs_excl = ATOMIC_INIT(0), \
141 .pi_lock = __SPIN_LOCK_UNLOCKED(tsk.pi_lock), \ 164 .pi_lock = __SPIN_LOCK_UNLOCKED(tsk.pi_lock), \
165 .pids = { \
166 [PIDTYPE_PID] = INIT_PID_LINK(PIDTYPE_PID), \
167 [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \
168 [PIDTYPE_SID] = INIT_PID_LINK(PIDTYPE_SID), \
169 }, \
142 INIT_TRACE_IRQFLAGS \ 170 INIT_TRACE_IRQFLAGS \
143 INIT_LOCKDEP \ 171 INIT_LOCKDEP \
144} 172}
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index f7b01b9a35b3..5323f6275854 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -241,6 +241,16 @@ static inline void __deprecated save_and_cli(unsigned long *x)
241#define save_and_cli(x) save_and_cli(&x) 241#define save_and_cli(x) save_and_cli(&x)
242#endif /* CONFIG_SMP */ 242#endif /* CONFIG_SMP */
243 243
244/* Some architectures might implement lazy enabling/disabling of
245 * interrupts. In some cases, such as stop_machine, we might want
246 * to ensure that after a local_irq_disable(), interrupts have
247 * really been disabled in hardware. Such architectures need to
248 * implement the following hook.
249 */
250#ifndef hard_irq_disable
251#define hard_irq_disable() do { } while(0)
252#endif
253
244/* PLEASE, avoid to allocate new softirqs, if you need not _really_ high 254/* PLEASE, avoid to allocate new softirqs, if you need not _really_ high
245 frequency threaded job scheduling. For almost all the purposes 255 frequency threaded job scheduling. For almost all the purposes
246 tasklets are more than enough. F.e. all serial device BHs et 256 tasklets are more than enough. F.e. all serial device BHs et
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 8645181fca0f..eec0d13169a6 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -213,6 +213,17 @@ extern enum system_states {
213 213
214extern void dump_stack(void); 214extern void dump_stack(void);
215 215
216enum {
217 DUMP_PREFIX_NONE,
218 DUMP_PREFIX_ADDRESS,
219 DUMP_PREFIX_OFFSET
220};
221extern void hex_dump_to_buffer(const void *buf, size_t len, char *linebuf,
222 size_t linebuflen);
223extern void print_hex_dump(const char *level, int prefix_type,
224 void *buf, size_t len);
225#define hex_asc(x) "0123456789abcdef"[x]
226
216#ifdef DEBUG 227#ifdef DEBUG
217/* If you are writing a driver, please use dev_dbg instead */ 228/* If you are writing a driver, please use dev_dbg instead */
218#define pr_debug(fmt,arg...) \ 229#define pr_debug(fmt,arg...) \
diff --git a/include/linux/magic.h b/include/linux/magic.h
index a9c6567fe70c..9d713c03e3da 100644
--- a/include/linux/magic.h
+++ b/include/linux/magic.h
@@ -14,6 +14,7 @@
14#define ISOFS_SUPER_MAGIC 0x9660 14#define ISOFS_SUPER_MAGIC 0x9660
15#define JFFS2_SUPER_MAGIC 0x72b6 15#define JFFS2_SUPER_MAGIC 0x72b6
16#define KVMFS_SUPER_MAGIC 0x19700426 16#define KVMFS_SUPER_MAGIC 0x19700426
17#define ANON_INODE_FS_MAGIC 0x09041934
17 18
18#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */ 19#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */
19#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ 20#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */
diff --git a/include/linux/module.h b/include/linux/module.h
index 792d483c9af7..e6e0f86ef5fc 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -124,7 +124,7 @@ extern struct module __this_module;
124 */ 124 */
125#define MODULE_LICENSE(_license) MODULE_INFO(license, _license) 125#define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
126 126
127/* Author, ideally of form NAME <EMAIL>[, NAME <EMAIL>]*[ and NAME <EMAIL>] */ 127/* Author, ideally of form NAME[, NAME]*[ and NAME] */
128#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author) 128#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
129 129
130/* What your module does. */ 130/* What your module does. */
diff --git a/include/linux/mpage.h b/include/linux/mpage.h
index cc5fb75af78a..068a0c9946af 100644
--- a/include/linux/mpage.h
+++ b/include/linux/mpage.h
@@ -12,7 +12,6 @@
12#ifdef CONFIG_BLOCK 12#ifdef CONFIG_BLOCK
13 13
14struct writeback_control; 14struct writeback_control;
15typedef int (writepage_t)(struct page *page, struct writeback_control *wbc);
16 15
17int mpage_readpages(struct address_space *mapping, struct list_head *pages, 16int mpage_readpages(struct address_space *mapping, struct list_head *pages,
18 unsigned nr_pages, get_block_t get_block); 17 unsigned nr_pages, get_block_t get_block);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 30446222b396..f671cd2f133f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -467,6 +467,8 @@ struct net_device
467 /* device index hash chain */ 467 /* device index hash chain */
468 struct hlist_node index_hlist; 468 struct hlist_node index_hlist;
469 469
470 struct net_device *link_watch_next;
471
470 /* register/unregister state machine */ 472 /* register/unregister state machine */
471 enum { NETREG_UNINITIALIZED=0, 473 enum { NETREG_UNINITIALIZED=0,
472 NETREG_REGISTERED, /* completed register_netdevice */ 474 NETREG_REGISTERED, /* completed register_netdevice */
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 022edfa97ed9..7e733a6ba4f6 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -54,6 +54,14 @@ struct xt_entry_target
54 unsigned char data[0]; 54 unsigned char data[0];
55}; 55};
56 56
57#define XT_TARGET_INIT(__name, __size) \
58{ \
59 .target.u.user = { \
60 .target_size = XT_ALIGN(__size), \
61 .name = __name, \
62 }, \
63}
64
57struct xt_standard_target 65struct xt_standard_target
58{ 66{
59 struct xt_entry_target target; 67 struct xt_entry_target target;
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h
index 24c8786d12e9..584cd1b18f12 100644
--- a/include/linux/netfilter_arp/arp_tables.h
+++ b/include/linux/netfilter_arp/arp_tables.h
@@ -238,6 +238,47 @@ static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e
238 */ 238 */
239#ifdef __KERNEL__ 239#ifdef __KERNEL__
240 240
241/* Standard entry. */
242struct arpt_standard
243{
244 struct arpt_entry entry;
245 struct arpt_standard_target target;
246};
247
248struct arpt_error_target
249{
250 struct arpt_entry_target target;
251 char errorname[ARPT_FUNCTION_MAXNAMELEN];
252};
253
254struct arpt_error
255{
256 struct arpt_entry entry;
257 struct arpt_error_target target;
258};
259
260#define ARPT_ENTRY_INIT(__size) \
261{ \
262 .target_offset = sizeof(struct arpt_entry), \
263 .next_offset = (__size), \
264}
265
266#define ARPT_STANDARD_INIT(__verdict) \
267{ \
268 .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_standard)), \
269 .target = XT_TARGET_INIT(ARPT_STANDARD_TARGET, \
270 sizeof(struct arpt_standard_target)), \
271 .target.verdict = -(__verdict) - 1, \
272}
273
274#define ARPT_ERROR_INIT \
275{ \
276 .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_error)), \
277 .target = XT_TARGET_INIT(ARPT_ERROR_TARGET, \
278 sizeof(struct arpt_error_target)), \
279 .target.errorname = "ERROR", \
280}
281
241#define arpt_register_target(tgt) \ 282#define arpt_register_target(tgt) \
242({ (tgt)->family = NF_ARP; \ 283({ (tgt)->family = NF_ARP; \
243 xt_register_target(tgt); }) 284 xt_register_target(tgt); })
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 9527296595cd..2f46dd728ee1 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -295,6 +295,28 @@ struct ipt_error
295 struct ipt_error_target target; 295 struct ipt_error_target target;
296}; 296};
297 297
298#define IPT_ENTRY_INIT(__size) \
299{ \
300 .target_offset = sizeof(struct ipt_entry), \
301 .next_offset = (__size), \
302}
303
304#define IPT_STANDARD_INIT(__verdict) \
305{ \
306 .entry = IPT_ENTRY_INIT(sizeof(struct ipt_standard)), \
307 .target = XT_TARGET_INIT(IPT_STANDARD_TARGET, \
308 sizeof(struct xt_standard_target)), \
309 .target.verdict = -(__verdict) - 1, \
310}
311
312#define IPT_ERROR_INIT \
313{ \
314 .entry = IPT_ENTRY_INIT(sizeof(struct ipt_error)), \
315 .target = XT_TARGET_INIT(IPT_ERROR_TARGET, \
316 sizeof(struct ipt_error_target)), \
317 .target.errorname = "ERROR", \
318}
319
298extern unsigned int ipt_do_table(struct sk_buff **pskb, 320extern unsigned int ipt_do_table(struct sk_buff **pskb,
299 unsigned int hook, 321 unsigned int hook,
300 const struct net_device *in, 322 const struct net_device *in,
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index 61aa10412fc8..4686f8342cbd 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -123,6 +123,28 @@ struct ip6t_error
123 struct ip6t_error_target target; 123 struct ip6t_error_target target;
124}; 124};
125 125
126#define IP6T_ENTRY_INIT(__size) \
127{ \
128 .target_offset = sizeof(struct ip6t_entry), \
129 .next_offset = (__size), \
130}
131
132#define IP6T_STANDARD_INIT(__verdict) \
133{ \
134 .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \
135 .target = XT_TARGET_INIT(IP6T_STANDARD_TARGET, \
136 sizeof(struct ip6t_standard_target)), \
137 .target.verdict = -(__verdict) - 1, \
138}
139
140#define IP6T_ERROR_INIT \
141{ \
142 .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)), \
143 .target = XT_TARGET_INIT(IP6T_ERROR_TARGET, \
144 sizeof(struct ip6t_error_target)), \
145 .target.errorname = "ERROR", \
146}
147
126/* 148/*
127 * New IP firewall options for [gs]etsockopt at the RAW IP level. 149 * New IP firewall options for [gs]etsockopt at the RAW IP level.
128 * Unlike BSD Linux inherits IP options so you don't have to use 150 * Unlike BSD Linux inherits IP options so you don't have to use
diff --git a/include/linux/pid.h b/include/linux/pid.h
index 2ac27f9997dd..1e0e4e3423a6 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -51,6 +51,8 @@ struct pid
51 struct rcu_head rcu; 51 struct rcu_head rcu;
52}; 52};
53 53
54extern struct pid init_struct_pid;
55
54struct pid_link 56struct pid_link
55{ 57{
56 struct hlist_node node; 58 struct hlist_node node;
@@ -76,8 +78,7 @@ extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type);
76 * write-held. 78 * write-held.
77 */ 79 */
78extern int FASTCALL(attach_pid(struct task_struct *task, 80extern int FASTCALL(attach_pid(struct task_struct *task,
79 enum pid_type type, int nr)); 81 enum pid_type type, struct pid *pid));
80
81extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type)); 82extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type));
82extern void FASTCALL(transfer_pid(struct task_struct *old, 83extern void FASTCALL(transfer_pid(struct task_struct *old,
83 struct task_struct *new, enum pid_type)); 84 struct task_struct *new, enum pid_type));
diff --git a/include/linux/sched.h b/include/linux/sched.h
index e38c436ee12b..a81897e2a244 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -392,6 +392,7 @@ struct sighand_struct {
392 atomic_t count; 392 atomic_t count;
393 struct k_sigaction action[_NSIG]; 393 struct k_sigaction action[_NSIG];
394 spinlock_t siglock; 394 spinlock_t siglock;
395 struct list_head signalfd_list;
395}; 396};
396 397
397struct pacct_struct { 398struct pacct_struct {
@@ -470,6 +471,7 @@ struct signal_struct {
470 cputime_t utime, stime, cutime, cstime; 471 cputime_t utime, stime, cutime, cstime;
471 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; 472 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
472 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; 473 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
474 unsigned long inblock, oublock, cinblock, coublock;
473 475
474 /* 476 /*
475 * Cumulative ns of scheduled CPU time for dead threads in the 477 * Cumulative ns of scheduled CPU time for dead threads in the
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 3fa0fab4a04b..9a5eac508e5e 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -233,6 +233,7 @@ static inline int valid_signal(unsigned long sig)
233 return sig <= _NSIG ? 1 : 0; 233 return sig <= _NSIG ? 1 : 0;
234} 234}
235 235
236extern int next_signal(struct sigpending *pending, sigset_t *mask);
236extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); 237extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
237extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); 238extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
238extern long do_sigpending(void __user *, unsigned long); 239extern long do_sigpending(void __user *, unsigned long);
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h
new file mode 100644
index 000000000000..510429495690
--- /dev/null
+++ b/include/linux/signalfd.h
@@ -0,0 +1,97 @@
1/*
2 * include/linux/signalfd.h
3 *
4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
5 *
6 */
7
8#ifndef _LINUX_SIGNALFD_H
9#define _LINUX_SIGNALFD_H
10
11
12struct signalfd_siginfo {
13 __u32 signo;
14 __s32 err;
15 __s32 code;
16 __u32 pid;
17 __u32 uid;
18 __s32 fd;
19 __u32 tid;
20 __u32 band;
21 __u32 overrun;
22 __u32 trapno;
23 __s32 status;
24 __s32 svint;
25 __u64 svptr;
26 __u64 utime;
27 __u64 stime;
28 __u64 addr;
29
30 /*
31 * Pad strcture to 128 bytes. Remember to update the
32 * pad size when you add new memebers. We use a fixed
33 * size structure to avoid compatibility problems with
34 * future versions, and we leave extra space for additional
35 * members. We use fixed size members because this strcture
36 * comes out of a read(2) and we really don't want to have
37 * a compat on read(2).
38 */
39 __u8 __pad[48];
40};
41
42
43#ifdef __KERNEL__
44
45#ifdef CONFIG_SIGNALFD
46
47/*
48 * Deliver the signal to listening signalfd. This must be called
49 * with the sighand lock held. Same are the following that end up
50 * calling signalfd_deliver().
51 */
52void signalfd_deliver(struct task_struct *tsk, int sig);
53
54/*
55 * No need to fall inside signalfd_deliver() if no signal listeners
56 * are available.
57 */
58static inline void signalfd_notify(struct task_struct *tsk, int sig)
59{
60 if (unlikely(!list_empty(&tsk->sighand->signalfd_list)))
61 signalfd_deliver(tsk, sig);
62}
63
64/*
65 * The signal -1 is used to notify the signalfd that the sighand
66 * is on its way to be detached.
67 */
68static inline void signalfd_detach_locked(struct task_struct *tsk)
69{
70 if (unlikely(!list_empty(&tsk->sighand->signalfd_list)))
71 signalfd_deliver(tsk, -1);
72}
73
74static inline void signalfd_detach(struct task_struct *tsk)
75{
76 struct sighand_struct *sighand = tsk->sighand;
77
78 if (unlikely(!list_empty(&sighand->signalfd_list))) {
79 spin_lock_irq(&sighand->siglock);
80 signalfd_deliver(tsk, -1);
81 spin_unlock_irq(&sighand->siglock);
82 }
83}
84
85#else /* CONFIG_SIGNALFD */
86
87#define signalfd_deliver(t, s) do { } while (0)
88#define signalfd_notify(t, s) do { } while (0)
89#define signalfd_detach_locked(t) do { } while (0)
90#define signalfd_detach(t) do { } while (0)
91
92#endif /* CONFIG_SIGNALFD */
93
94#endif /* __KERNEL__ */
95
96#endif /* _LINUX_SIGNALFD_H */
97
diff --git a/include/linux/synclink.h b/include/linux/synclink.h
index c8b042667af1..5562fbf72095 100644
--- a/include/linux/synclink.h
+++ b/include/linux/synclink.h
@@ -291,4 +291,28 @@ struct gpio_desc {
291#define MGSL_IOCGGPIO _IOR(MGSL_MAGIC_IOC,17,struct gpio_desc) 291#define MGSL_IOCGGPIO _IOR(MGSL_MAGIC_IOC,17,struct gpio_desc)
292#define MGSL_IOCWAITGPIO _IOWR(MGSL_MAGIC_IOC,18,struct gpio_desc) 292#define MGSL_IOCWAITGPIO _IOWR(MGSL_MAGIC_IOC,18,struct gpio_desc)
293 293
294#ifdef __KERNEL__
295/* provide 32 bit ioctl compatibility on 64 bit systems */
296#ifdef CONFIG_COMPAT
297#include <linux/compat.h>
298struct MGSL_PARAMS32 {
299 compat_ulong_t mode;
300 unsigned char loopback;
301 unsigned short flags;
302 unsigned char encoding;
303 compat_ulong_t clock_speed;
304 unsigned char addr_filter;
305 unsigned short crc_type;
306 unsigned char preamble_length;
307 unsigned char preamble;
308 compat_ulong_t data_rate;
309 unsigned char data_bits;
310 unsigned char stop_bits;
311 unsigned char parity;
312};
313#define MGSL_IOCSPARAMS32 _IOW(MGSL_MAGIC_IOC,0,struct MGSL_PARAMS32)
314#define MGSL_IOCGPARAMS32 _IOR(MGSL_MAGIC_IOC,1,struct MGSL_PARAMS32)
315#endif
316#endif
317
294#endif /* _SYNCLINK_H_ */ 318#endif /* _SYNCLINK_H_ */
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 3139f4412297..b02070eac422 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -604,6 +604,10 @@ asmlinkage long sys_get_robust_list(int pid,
604asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, 604asmlinkage long sys_set_robust_list(struct robust_list_head __user *head,
605 size_t len); 605 size_t len);
606asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache); 606asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache);
607asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, size_t sizemask);
608asmlinkage long sys_timerfd(int ufd, int clockid, int flags,
609 const struct itimerspec __user *utmr);
610asmlinkage long sys_eventfd(unsigned int count);
607 611
608int kernel_execve(const char *filename, char *const argv[], char *const envp[]); 612int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
609 613
diff --git a/include/linux/task_io_accounting_ops.h b/include/linux/task_io_accounting_ops.h
index df2a319106b2..1218733ec6b5 100644
--- a/include/linux/task_io_accounting_ops.h
+++ b/include/linux/task_io_accounting_ops.h
@@ -10,11 +10,29 @@ static inline void task_io_account_read(size_t bytes)
10 current->ioac.read_bytes += bytes; 10 current->ioac.read_bytes += bytes;
11} 11}
12 12
13/*
14 * We approximate number of blocks, because we account bytes only.
15 * A 'block' is 512 bytes
16 */
17static inline unsigned long task_io_get_inblock(const struct task_struct *p)
18{
19 return p->ioac.read_bytes >> 9;
20}
21
13static inline void task_io_account_write(size_t bytes) 22static inline void task_io_account_write(size_t bytes)
14{ 23{
15 current->ioac.write_bytes += bytes; 24 current->ioac.write_bytes += bytes;
16} 25}
17 26
27/*
28 * We approximate number of blocks, because we account bytes only.
29 * A 'block' is 512 bytes
30 */
31static inline unsigned long task_io_get_oublock(const struct task_struct *p)
32{
33 return p->ioac.write_bytes >> 9;
34}
35
18static inline void task_io_account_cancelled_write(size_t bytes) 36static inline void task_io_account_cancelled_write(size_t bytes)
19{ 37{
20 current->ioac.cancelled_write_bytes += bytes; 38 current->ioac.cancelled_write_bytes += bytes;
@@ -31,10 +49,20 @@ static inline void task_io_account_read(size_t bytes)
31{ 49{
32} 50}
33 51
52static inline unsigned long task_io_get_inblock(const struct task_struct *p)
53{
54 return 0;
55}
56
34static inline void task_io_account_write(size_t bytes) 57static inline void task_io_account_write(size_t bytes)
35{ 58{
36} 59}
37 60
61static inline unsigned long task_io_get_oublock(const struct task_struct *p)
62{
63 return 0;
64}
65
38static inline void task_io_account_cancelled_write(size_t bytes) 66static inline void task_io_account_cancelled_write(size_t bytes)
39{ 67{
40} 68}
diff --git a/include/linux/timerfd.h b/include/linux/timerfd.h
new file mode 100644
index 000000000000..cf2b10d75731
--- /dev/null
+++ b/include/linux/timerfd.h
@@ -0,0 +1,17 @@
1/*
2 * include/linux/timerfd.h
3 *
4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
5 *
6 */
7
8#ifndef _LINUX_TIMERFD_H
9#define _LINUX_TIMERFD_H
10
11
12#define TFD_TIMER_ABSTIME (1 << 0)
13
14
15
16#endif /* _LINUX_TIMERFD_H */
17
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 659487e3ebeb..85c95cd39bc3 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -52,6 +52,11 @@
52 * This routine allows the tty driver to implement 52 * This routine allows the tty driver to implement
53 * device-specific ioctl's. If the ioctl number passed in cmd 53 * device-specific ioctl's. If the ioctl number passed in cmd
54 * is not recognized by the driver, it should return ENOIOCTLCMD. 54 * is not recognized by the driver, it should return ENOIOCTLCMD.
55 *
56 * long (*compat_ioctl)(struct tty_struct *tty, struct file * file,
57 * unsigned int cmd, unsigned long arg);
58 *
59 * implement ioctl processing for 32 bit process on 64 bit system
55 * 60 *
56 * void (*set_termios)(struct tty_struct *tty, struct ktermios * old); 61 * void (*set_termios)(struct tty_struct *tty, struct ktermios * old);
57 * 62 *
@@ -132,6 +137,8 @@ struct tty_operations {
132 int (*chars_in_buffer)(struct tty_struct *tty); 137 int (*chars_in_buffer)(struct tty_struct *tty);
133 int (*ioctl)(struct tty_struct *tty, struct file * file, 138 int (*ioctl)(struct tty_struct *tty, struct file * file,
134 unsigned int cmd, unsigned long arg); 139 unsigned int cmd, unsigned long arg);
140 long (*compat_ioctl)(struct tty_struct *tty, struct file * file,
141 unsigned int cmd, unsigned long arg);
135 void (*set_termios)(struct tty_struct *tty, struct ktermios * old); 142 void (*set_termios)(struct tty_struct *tty, struct ktermios * old);
136 void (*throttle)(struct tty_struct * tty); 143 void (*throttle)(struct tty_struct * tty);
137 void (*unthrottle)(struct tty_struct * tty); 144 void (*unthrottle)(struct tty_struct * tty);
@@ -193,6 +200,8 @@ struct tty_driver {
193 int (*chars_in_buffer)(struct tty_struct *tty); 200 int (*chars_in_buffer)(struct tty_struct *tty);
194 int (*ioctl)(struct tty_struct *tty, struct file * file, 201 int (*ioctl)(struct tty_struct *tty, struct file * file,
195 unsigned int cmd, unsigned long arg); 202 unsigned int cmd, unsigned long arg);
203 long (*compat_ioctl)(struct tty_struct *tty, struct file * file,
204 unsigned int cmd, unsigned long arg);
196 void (*set_termios)(struct tty_struct *tty, struct ktermios * old); 205 void (*set_termios)(struct tty_struct *tty, struct ktermios * old);
197 void (*throttle)(struct tty_struct * tty); 206 void (*throttle)(struct tty_struct * tty);
198 void (*unthrottle)(struct tty_struct * tty); 207 void (*unthrottle)(struct tty_struct * tty);
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index d75932e27710..6226504d9108 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -59,6 +59,11 @@
59 * low-level driver can "grab" an ioctl request before the line 59 * low-level driver can "grab" an ioctl request before the line
60 * discpline has a chance to see it. 60 * discpline has a chance to see it.
61 * 61 *
62 * long (*compat_ioctl)(struct tty_struct * tty, struct file * file,
63 * unsigned int cmd, unsigned long arg);
64 *
65 * Process ioctl calls from 32-bit process on 64-bit system
66 *
62 * void (*set_termios)(struct tty_struct *tty, struct ktermios * old); 67 * void (*set_termios)(struct tty_struct *tty, struct ktermios * old);
63 * 68 *
64 * This function notifies the line discpline that a change has 69 * This function notifies the line discpline that a change has
@@ -118,6 +123,8 @@ struct tty_ldisc {
118 const unsigned char * buf, size_t nr); 123 const unsigned char * buf, size_t nr);
119 int (*ioctl)(struct tty_struct * tty, struct file * file, 124 int (*ioctl)(struct tty_struct * tty, struct file * file,
120 unsigned int cmd, unsigned long arg); 125 unsigned int cmd, unsigned long arg);
126 long (*compat_ioctl)(struct tty_struct * tty, struct file * file,
127 unsigned int cmd, unsigned long arg);
121 void (*set_termios)(struct tty_struct *tty, struct ktermios * old); 128 void (*set_termios)(struct tty_struct *tty, struct ktermios * old);
122 unsigned int (*poll)(struct tty_struct *, struct file *, 129 unsigned int (*poll)(struct tty_struct *, struct file *,
123 struct poll_table_struct *); 130 struct poll_table_struct *);
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index daa6c125f66e..050915b59576 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -111,9 +111,15 @@ balance_dirty_pages_ratelimited(struct address_space *mapping)
111 balance_dirty_pages_ratelimited_nr(mapping, 1); 111 balance_dirty_pages_ratelimited_nr(mapping, 1);
112} 112}
113 113
114typedef int (*writepage_t)(struct page *page, struct writeback_control *wbc,
115 void *data);
116
114int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0); 117int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0);
115extern int generic_writepages(struct address_space *mapping, 118int generic_writepages(struct address_space *mapping,
116 struct writeback_control *wbc); 119 struct writeback_control *wbc);
120int write_cache_pages(struct address_space *mapping,
121 struct writeback_control *wbc, writepage_t writepage,
122 void *data);
117int do_writepages(struct address_space *mapping, struct writeback_control *wbc); 123int do_writepages(struct address_space *mapping, struct writeback_control *wbc);
118int sync_page_range(struct inode *inode, struct address_space *mapping, 124int sync_page_range(struct inode *inode, struct address_space *mapping,
119 loff_t pos, loff_t count); 125 loff_t pos, loff_t count);
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 1c6b8bd09b9a..4732432f8eb0 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -183,13 +183,6 @@ extern void nf_conntrack_hash_insert(struct nf_conn *ct);
183 183
184extern void nf_conntrack_flush(void); 184extern void nf_conntrack_flush(void);
185 185
186extern struct nf_conntrack_helper *
187nf_ct_helper_find_get( const struct nf_conntrack_tuple *tuple);
188extern void nf_ct_helper_put(struct nf_conntrack_helper *helper);
189
190extern struct nf_conntrack_helper *
191__nf_conntrack_helper_find_byname(const char *name);
192
193extern int nf_ct_invert_tuplepr(struct nf_conntrack_tuple *inverse, 186extern int nf_ct_invert_tuplepr(struct nf_conntrack_tuple *inverse,
194 const struct nf_conntrack_tuple *orig); 187 const struct nf_conntrack_tuple *orig);
195 188
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
index f32f714e5d92..96a58d8e1d3f 100644
--- a/include/net/netfilter/nf_conntrack_l3proto.h
+++ b/include/net/netfilter/nf_conntrack_l3proto.h
@@ -56,9 +56,6 @@ struct nf_conntrack_l3proto
56 */ 56 */
57 int (*new)(struct nf_conn *conntrack, const struct sk_buff *skb); 57 int (*new)(struct nf_conn *conntrack, const struct sk_buff *skb);
58 58
59 /* Called when a conntrack entry is destroyed */
60 void (*destroy)(struct nf_conn *conntrack);
61
62 /* 59 /*
63 * Called before tracking. 60 * Called before tracking.
64 * *dataoff: offset of protocol header (TCP, UDP,...) in *pskb 61 * *dataoff: offset of protocol header (TCP, UDP,...) in *pskb
diff --git a/include/net/netfilter/nf_nat_rule.h b/include/net/netfilter/nf_nat_rule.h
index e76565459ad9..f9743187d57f 100644
--- a/include/net/netfilter/nf_nat_rule.h
+++ b/include/net/netfilter/nf_nat_rule.h
@@ -10,16 +10,11 @@ extern int nf_nat_rule_find(struct sk_buff **pskb,
10 unsigned int hooknum, 10 unsigned int hooknum,
11 const struct net_device *in, 11 const struct net_device *in,
12 const struct net_device *out, 12 const struct net_device *out,
13 struct nf_conn *ct, 13 struct nf_conn *ct);
14 struct nf_nat_info *info);
15 14
16extern unsigned int 15extern unsigned int
17alloc_null_binding(struct nf_conn *ct, 16alloc_null_binding(struct nf_conn *ct, unsigned int hooknum);
18 struct nf_nat_info *info,
19 unsigned int hooknum);
20 17
21extern unsigned int 18extern unsigned int
22alloc_null_binding_confirmed(struct nf_conn *ct, 19alloc_null_binding_confirmed(struct nf_conn *ct, unsigned int hooknum);
23 struct nf_nat_info *info,
24 unsigned int hooknum);
25#endif /* _NF_NAT_RULE_H */ 20#endif /* _NF_NAT_RULE_H */
diff --git a/include/net/udp.h b/include/net/udp.h
index 98755ebaf163..496f89d45c8b 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -119,9 +119,16 @@ static inline void udp_lib_close(struct sock *sk, long timeout)
119} 119}
120 120
121 121
122struct udp_get_port_ops {
123 int (*saddr_cmp)(const struct sock *sk1, const struct sock *sk2);
124 int (*saddr_any)(const struct sock *sk);
125 unsigned int (*hash_port_and_rcv_saddr)(__u16 port,
126 const struct sock *sk);
127};
128
122/* net/ipv4/udp.c */ 129/* net/ipv4/udp.c */
123extern int udp_get_port(struct sock *sk, unsigned short snum, 130extern int udp_get_port(struct sock *sk, unsigned short snum,
124 int (*saddr_cmp)(const struct sock *, const struct sock *)); 131 const struct udp_get_port_ops *ops);
125extern void udp_err(struct sk_buff *, u32); 132extern void udp_err(struct sk_buff *, u32);
126 133
127extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, 134extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk,
diff --git a/include/net/udplite.h b/include/net/udplite.h
index 635b0eafca95..50b4b424d1ca 100644
--- a/include/net/udplite.h
+++ b/include/net/udplite.h
@@ -120,5 +120,5 @@ static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb)
120 120
121extern void udplite4_register(void); 121extern void udplite4_register(void);
122extern int udplite_get_port(struct sock *sk, unsigned short snum, 122extern int udplite_get_port(struct sock *sk, unsigned short snum,
123 int (*scmp)(const struct sock *, const struct sock *)); 123 const struct udp_get_port_ops *ops);
124#endif /* _UDPLITE_H */ 124#endif /* _UDPLITE_H */
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h
new file mode 100644
index 000000000000..4eea63761a3f
--- /dev/null
+++ b/include/video/atmel_lcdc.h
@@ -0,0 +1,196 @@
1/*
2 * Header file for AT91/AT32 LCD Controller
3 *
4 * Data structure and register user interface
5 *
6 * Copyright (C) 2007 Atmel Corporation
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ATMEL_LCDC_H__
23#define __ATMEL_LCDC_H__
24
25 /* LCD Controller info data structure */
26struct atmel_lcdfb_info {
27 spinlock_t lock;
28 struct fb_info *info;
29 void __iomem *mmio;
30 unsigned long irq_base;
31
32 unsigned int guard_time;
33 struct platform_device *pdev;
34 struct clk *bus_clk;
35 struct clk *lcdc_clk;
36 unsigned int default_bpp;
37 unsigned int default_lcdcon2;
38 unsigned int default_dmacon;
39 void (*atmel_lcdfb_power_control)(int on);
40 struct fb_monspecs *default_monspecs;
41 u32 pseudo_palette[16];
42};
43
44#define ATMEL_LCDC_DMABADDR1 0x00
45#define ATMEL_LCDC_DMABADDR2 0x04
46#define ATMEL_LCDC_DMAFRMPT1 0x08
47#define ATMEL_LCDC_DMAFRMPT2 0x0c
48#define ATMEL_LCDC_DMAFRMADD1 0x10
49#define ATMEL_LCDC_DMAFRMADD2 0x14
50
51#define ATMEL_LCDC_DMAFRMCFG 0x18
52#define ATMEL_LCDC_FRSIZE (0x7fffff << 0)
53#define ATMEL_LCDC_BLENGTH_OFFSET 24
54#define ATMEL_LCDC_BLENGTH (0x7f << ATMEL_LCDC_BLENGTH_OFFSET)
55
56#define ATMEL_LCDC_DMACON 0x1c
57#define ATMEL_LCDC_DMAEN (0x1 << 0)
58#define ATMEL_LCDC_DMARST (0x1 << 1)
59#define ATMEL_LCDC_DMABUSY (0x1 << 2)
60#define ATMEL_LCDC_DMAUPDT (0x1 << 3)
61#define ATMEL_LCDC_DMA2DEN (0x1 << 4)
62
63#define ATMEL_LCDC_DMA2DCFG 0x20
64#define ATMEL_LCDC_ADDRINC_OFFSET 0
65#define ATMEL_LCDC_ADDRINC (0xffff)
66#define ATMEL_LCDC_PIXELOFF_OFFSET 24
67#define ATMEL_LCDC_PIXELOFF (0x1f << 24)
68
69#define ATMEL_LCDC_LCDCON1 0x0800
70#define ATMEL_LCDC_BYPASS (1 << 0)
71#define ATMEL_LCDC_CLKVAL_OFFSET 12
72#define ATMEL_LCDC_CLKVAL (0x1ff << ATMEL_LCDC_CLKVAL_OFFSET)
73#define ATMEL_LCDC_LINCNT (0x7ff << 21)
74
75#define ATMEL_LCDC_LCDCON2 0x0804
76#define ATMEL_LCDC_DISTYPE (3 << 0)
77#define ATMEL_LCDC_DISTYPE_STNMONO (0 << 0)
78#define ATMEL_LCDC_DISTYPE_STNCOLOR (1 << 0)
79#define ATMEL_LCDC_DISTYPE_TFT (2 << 0)
80#define ATMEL_LCDC_SCANMOD (1 << 2)
81#define ATMEL_LCDC_SCANMOD_SINGLE (0 << 2)
82#define ATMEL_LCDC_SCANMOD_DUAL (1 << 2)
83#define ATMEL_LCDC_IFWIDTH (3 << 3)
84#define ATMEL_LCDC_IFWIDTH_4 (0 << 3)
85#define ATMEL_LCDC_IFWIDTH_8 (1 << 3)
86#define ATMEL_LCDC_IFWIDTH_16 (2 << 3)
87#define ATMEL_LCDC_PIXELSIZE (7 << 5)
88#define ATMEL_LCDC_PIXELSIZE_1 (0 << 5)
89#define ATMEL_LCDC_PIXELSIZE_2 (1 << 5)
90#define ATMEL_LCDC_PIXELSIZE_4 (2 << 5)
91#define ATMEL_LCDC_PIXELSIZE_8 (3 << 5)
92#define ATMEL_LCDC_PIXELSIZE_16 (4 << 5)
93#define ATMEL_LCDC_PIXELSIZE_24 (5 << 5)
94#define ATMEL_LCDC_PIXELSIZE_32 (6 << 5)
95#define ATMEL_LCDC_INVVD (1 << 8)
96#define ATMEL_LCDC_INVVD_NORMAL (0 << 8)
97#define ATMEL_LCDC_INVVD_INVERTED (1 << 8)
98#define ATMEL_LCDC_INVFRAME (1 << 9 )
99#define ATMEL_LCDC_INVFRAME_NORMAL (0 << 9)
100#define ATMEL_LCDC_INVFRAME_INVERTED (1 << 9)
101#define ATMEL_LCDC_INVLINE (1 << 10)
102#define ATMEL_LCDC_INVLINE_NORMAL (0 << 10)
103#define ATMEL_LCDC_INVLINE_INVERTED (1 << 10)
104#define ATMEL_LCDC_INVCLK (1 << 11)
105#define ATMEL_LCDC_INVCLK_NORMAL (0 << 11)
106#define ATMEL_LCDC_INVCLK_INVERTED (1 << 11)
107#define ATMEL_LCDC_INVDVAL (1 << 12)
108#define ATMEL_LCDC_INVDVAL_NORMAL (0 << 12)
109#define ATMEL_LCDC_INVDVAL_INVERTED (1 << 12)
110#define ATMEL_LCDC_CLKMOD (1 << 15)
111#define ATMEL_LCDC_CLKMOD_ACTIVEDISPLAY (0 << 15)
112#define ATMEL_LCDC_CLKMOD_ALWAYSACTIVE (1 << 15)
113#define ATMEL_LCDC_MEMOR (1 << 31)
114#define ATMEL_LCDC_MEMOR_BIG (0 << 31)
115#define ATMEL_LCDC_MEMOR_LITTLE (1 << 31)
116
117#define ATMEL_LCDC_TIM1 0x0808
118#define ATMEL_LCDC_VFP (0xff << 0)
119#define ATMEL_LCDC_VBP_OFFSET 8
120#define ATMEL_LCDC_VBP (0xff << ATMEL_LCDC_VBP_OFFSET)
121#define ATMEL_LCDC_VPW_OFFSET 16
122#define ATMEL_LCDC_VPW (0x3f << ATMEL_LCDC_VPW_OFFSET)
123#define ATMEL_LCDC_VHDLY_OFFSET 24
124#define ATMEL_LCDC_VHDLY (0xf << ATMEL_LCDC_VHDLY_OFFSET)
125
126#define ATMEL_LCDC_TIM2 0x080c
127#define ATMEL_LCDC_HBP (0xff << 0)
128#define ATMEL_LCDC_HPW_OFFSET 8
129#define ATMEL_LCDC_HPW (0x3f << ATMEL_LCDC_HPW_OFFSET)
130#define ATMEL_LCDC_HFP_OFFSET 21
131#define ATMEL_LCDC_HFP (0x7ff << ATMEL_LCDC_HFP_OFFSET)
132
133#define ATMEL_LCDC_LCDFRMCFG 0x0810
134#define ATMEL_LCDC_LINEVAL (0x7ff << 0)
135#define ATMEL_LCDC_HOZVAL_OFFSET 21
136#define ATMEL_LCDC_HOZVAL (0x7ff << ATMEL_LCDC_HOZVAL_OFFSET)
137
138#define ATMEL_LCDC_FIFO 0x0814
139#define ATMEL_LCDC_FIFOTH (0xffff)
140
141#define ATMEL_LCDC_MVAL 0x0818
142
143#define ATMEL_LCDC_DP1_2 0x081c
144#define ATMEL_LCDC_DP4_7 0x0820
145#define ATMEL_LCDC_DP3_5 0x0824
146#define ATMEL_LCDC_DP2_3 0x0828
147#define ATMEL_LCDC_DP5_7 0x082c
148#define ATMEL_LCDC_DP3_4 0x0830
149#define ATMEL_LCDC_DP4_5 0x0834
150#define ATMEL_LCDC_DP6_7 0x0838
151#define ATMEL_LCDC_DP1_2_VAL (0xff)
152#define ATMEL_LCDC_DP4_7_VAL (0xfffffff)
153#define ATMEL_LCDC_DP3_5_VAL (0xfffff)
154#define ATMEL_LCDC_DP2_3_VAL (0xfff)
155#define ATMEL_LCDC_DP5_7_VAL (0xfffffff)
156#define ATMEL_LCDC_DP3_4_VAL (0xffff)
157#define ATMEL_LCDC_DP4_5_VAL (0xfffff)
158#define ATMEL_LCDC_DP6_7_VAL (0xfffffff)
159
160#define ATMEL_LCDC_PWRCON 0x083c
161#define ATMEL_LCDC_PWR (1 << 0)
162#define ATMEL_LCDC_GUARDT_OFFSET 1
163#define ATMEL_LCDC_GUARDT (0x7f << ATMEL_LCDC_GUARDT_OFFSET)
164#define ATMEL_LCDC_BUSY (1 << 31)
165
166#define ATMEL_LCDC_CONTRAST_CTR 0x0840
167#define ATMEL_LCDC_PS (3 << 0)
168#define ATMEL_LCDC_PS_DIV1 (0 << 0)
169#define ATMEL_LCDC_PS_DIV2 (1 << 0)
170#define ATMEL_LCDC_PS_DIV4 (2 << 0)
171#define ATMEL_LCDC_PS_DIV8 (3 << 0)
172#define ATMEL_LCDC_POL (1 << 2)
173#define ATMEL_LCDC_POL_NEGATIVE (0 << 2)
174#define ATMEL_LCDC_POL_POSITIVE (1 << 2)
175#define ATMEL_LCDC_ENA (1 << 3)
176#define ATMEL_LCDC_ENA_PWMDISABLE (0 << 3)
177#define ATMEL_LCDC_ENA_PWMENABLE (1 << 3)
178
179#define ATMEL_LCDC_CONTRAST_VAL 0x0844
180#define ATMEL_LCDC_CVAL (0xff)
181
182#define ATMEL_LCDC_IER 0x0848
183#define ATMEL_LCDC_IDR 0x084c
184#define ATMEL_LCDC_IMR 0x0850
185#define ATMEL_LCDC_ISR 0x0854
186#define ATMEL_LCDC_ICR 0x0858
187#define ATMEL_LCDC_LNI (1 << 0)
188#define ATMEL_LCDC_LSTLNI (1 << 1)
189#define ATMEL_LCDC_EOFI (1 << 2)
190#define ATMEL_LCDC_UFLWI (1 << 4)
191#define ATMEL_LCDC_OWRI (1 << 5)
192#define ATMEL_LCDC_MERI (1 << 6)
193
194#define ATMEL_LCDC_LUT(n) (0x0c00 + ((n)*4))
195
196#endif /* __ATMEL_LCDC_H__ */
diff --git a/include/video/pm3fb.h b/include/video/pm3fb.h
index 94c7d2da90ea..d52e45a1e9b8 100644
--- a/include/video/pm3fb.h
+++ b/include/video/pm3fb.h
@@ -7,9 +7,6 @@
7 * This file is subject to the terms and conditions of the GNU General Public 7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file COPYING in the main directory of this archive for 8 * License. See the file COPYING in the main directory of this archive for
9 * more details. 9 * more details.
10 *
11 * $Header: /cvsroot/linux/drivers/video/pm3fb.h,v 1.1 2002/02/25 19:11:06 marcelo Exp $
12 *
13 */ 10 */
14 11
15#ifndef PM3FB_H 12#ifndef PM3FB_H
@@ -1119,117 +1116,10 @@
1119/* ***** pm3fb useful define and macro ***** */ 1116/* ***** pm3fb useful define and macro ***** */
1120/* ***************************************** */ 1117/* ***************************************** */
1121 1118
1122/* permedia3 -specific definitions */
1123#define PM3_SCALE_TO_CLOCK(pr, fe, po) ((2 * PM3_REF_CLOCK * fe) / (pr * (1 << (po))))
1124
1125/* in case it's not in linux/pci.h */
1126#ifndef PCI_DEVICE_ID_3DLABS_PERMEDIA3
1127#define PCI_DEVICE_ID_3DLABS_PERMEDIA3 0x000a
1128#endif
1129
1130/* max number of simultaneous board */
1131#define PM3_MAX_BOARD 4
1132
1133/* max size of options */ 1119/* max size of options */
1134#define PM3_OPTIONS_SIZE 256 1120#define PM3_OPTIONS_SIZE 256
1135 1121
1136/* max size of font name */ 1122/* max size of font name */
1137#define PM3_FONTNAME_SIZE 40 1123#define PM3_FONTNAME_SIZE 40
1138 1124
1139/* do we want accelerated console */
1140#define PM3FB_USE_ACCEL 1
1141
1142/* for driver debugging ONLY */
1143/* 0 = assert only, 1 = error, 2 = info, 3+ = verbose */
1144/* define PM3FB_MASTER_DEBUG 1 */
1145#if defined(PM3FB_MASTER_DEBUG) && (PM3FB_MASTER_DEBUG >= 3)
1146#define PM3FB_TRACE
1147#endif /* defined(PM3FB_MASTER_DEBUG) && (PM3FB_MASTER_DEBUG >= 3) */
1148
1149#ifdef PM3FB_MASTER_DEBUG
1150#define DPRINTK(l,a,b...) do { if ((l) <= PM3FB_MASTER_DEBUG) printk("pm3fb: %s: " a, __FUNCTION__ , ## b); } while (0)
1151#define DASSERT(t,a,b...) do { if (!(t)) printk("pm3fb: _assert failed: %s: " a, __FUNCTION__ , ## b); } while (0)
1152#ifdef PM3FB_TRACE
1153#define DTRACE printk("pm3fb: _enter %s\n", __FUNCTION__)
1154#else /* PM3FB_TRACE */
1155#define DTRACE
1156#endif /* PM3FB_TRACE */
1157#else /* PM3FB_MASTER_DEBUG */
1158#define DPRINTK(l,a,b...)
1159#define DASSERT(t,a,b...)
1160#define DTRACE
1161#endif /* PM3FB_MASTER_DEBUG */
1162
1163#if defined(PM3FB_MASTER_DEBUG) && (PM3FB_MASTER_DEBUG >= 2)
1164#define PM3_SHOW_CUR_MODE pm3fb_show_cur_mode(l_fb_info)
1165#else
1166#define PM3_SHOW_CUR_MODE /* pm3fb_show_cur_mode() */
1167#endif
1168
1169/* ******************************************** */
1170/* ***** A bunch of register-access macro ***** */
1171/* ******************************************** */
1172
1173#define PM3_WRITE_REG(r, v) fb_writel(v, (l_fb_info->vIOBase + r))
1174#define PM3_READ_REG(r) fb_readl((l_fb_info->vIOBase + r))
1175
1176
1177#define depth2bpp(d) ((d + 7L) & ~7L)
1178#define depth2ByPP(d) (depth2bpp(d) / 8)
1179
1180#define depth_supported(d) ((d == 8) || (d == 12) || (d == 15) || (d == 16) || (d==32))
1181
1182
1183#define PM3_WAIT(n) \
1184do{ \
1185 while(PM3_READ_REG(PM3InFIFOSpace)<(n)); \
1186} while(0)
1187
1188#define PM3_DELAY(x) do { \
1189 int delay = x; \
1190 unsigned char tmp; \
1191 while(delay--){tmp = PM3_READ_REG(PM3InFIFOSpace);}; \
1192} while(0)
1193
1194#define PM3_SLOW_WRITE_REG(r,v) \
1195do{ \
1196 DASSERT((l_fb_info->vIOBase != (unsigned char*)(-1)), "l_fb_info->vIOBase mapped in slow write\n"); \
1197 mb(); \
1198 PM3_WAIT(1); \
1199 mb(); \
1200 PM3_WRITE_REG(r,v); \
1201} while(0)
1202
1203#define PM3_SET_INDEX(index) \
1204do{ \
1205 PM3_SLOW_WRITE_REG(PM3RD_IndexHigh,(((index)>>8)&0xff)); \
1206 PM3_SLOW_WRITE_REG(PM3RD_IndexLow,((index)&0xff)); \
1207} while(0)
1208
1209#define PM3_WRITE_DAC_REG(r, v) \
1210do { \
1211 DASSERT((l_fb_info->vIOBase != (unsigned char*)(-1)), "l_fb_info->vIOBase mapped in write dac reg\n"); \
1212 PM3_SET_INDEX(r); \
1213 mb(); \
1214 PM3_WRITE_REG(PM3RD_IndexedData, v); \
1215} while (0)
1216
1217/* next one is really a function, added as a macro to be consistent */
1218#define PM3_READ_DAC_REG(r) pm3fb_read_dac_reg(l_fb_info, r)
1219
1220
1221#define PM3_COLOR(c) \
1222do { \
1223 if (l_fb_info->current_par->depth == 8) \
1224 { \
1225 c = (c & 0xFF); \
1226 c = c | (c << 8); \
1227 } \
1228 if ((l_fb_info->current_par->depth == 8) || (depth2bpp(l_fb_info->current_par->depth) == 16)) \
1229 { \
1230 c = (c & 0xFFFF); \
1231 c = c | (c << 16); \
1232 } \
1233} while (0)
1234
1235#endif /* PM3FB_H */ 1125#endif /* PM3FB_H */