aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-01-26 22:19:57 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-26 22:19:57 -0500
commit97309d1a0bbdcb0813ea08574b4473d8e5416012 (patch)
tree0dcbcf5aa5146147e0ac1d0c4b73b868a67d333b /include
parentb4ea75b649417606fd6b38710a2962ec9770e772 (diff)
parentefd51b5c6798d103e3aa683464aebb2019b62119 (diff)
Merge branch 'upstream-fixes'
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-omap/clock.h2
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h14
-rw-r--r--include/asm-frv/thread_info.h2
-rw-r--r--include/asm-frv/unistd.h1
-rw-r--r--include/asm-i386/edac.h18
-rw-r--r--include/asm-i386/futex.h2
-rw-r--r--include/asm-i386/signal.h1
-rw-r--r--include/asm-i386/thread_info.h2
-rw-r--r--include/asm-i386/unistd.h18
-rw-r--r--include/asm-ia64/semaphore.h8
-rw-r--r--include/asm-ia64/sn/xp.h3
-rw-r--r--include/asm-ia64/sn/xpc.h9
-rw-r--r--include/asm-ia64/topology.h4
-rw-r--r--include/asm-powerpc/thread_info.h5
-rw-r--r--include/asm-powerpc/unistd.h6
-rw-r--r--include/asm-sparc/oplib.h2
-rw-r--r--include/asm-sparc/thread_info.h5
-rw-r--r--include/asm-sparc/unistd.h22
-rw-r--r--include/asm-sparc64/oplib.h2
-rw-r--r--include/asm-sparc64/thread_info.h6
-rw-r--r--include/asm-sparc64/unistd.h23
-rw-r--r--include/asm-um/io.h16
-rw-r--r--include/asm-um/thread_info.h13
-rw-r--r--include/asm-um/unistd.h1
-rw-r--r--include/asm-x86_64/edac.h18
-rw-r--r--include/asm-x86_64/ia32_unistd.h15
-rw-r--r--include/asm-x86_64/unistd.h29
-rw-r--r--include/linux/fcntl.h7
-rw-r--r--include/linux/fs.h7
-rw-r--r--include/linux/if_ether.h1
-rw-r--r--include/linux/mempolicy.h1
-rw-r--r--include/linux/mm_inline.h21
-rw-r--r--include/linux/mmzone.h12
-rw-r--r--include/linux/namei.h7
-rw-r--r--include/linux/netfilter/x_tables.h2
-rw-r--r--include/linux/nfsd/nfsd.h2
-rw-r--r--include/linux/nfsd/xdr4.h5
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/poll.h6
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/sunrpc/svc.h1
-rw-r--r--include/linux/swap.h12
-rw-r--r--include/linux/syscalls.h19
-rw-r--r--include/linux/sysctl.h1
-rw-r--r--include/linux/time.h2
-rw-r--r--include/linux/tipc_config.h7
-rw-r--r--include/linux/topology.h8
-rw-r--r--include/net/sctp/sctp.h2
-rw-r--r--include/net/sctp/structs.h89
-rw-r--r--include/scsi/scsi_transport_spi.h1
50 files changed, 343 insertions, 119 deletions
diff --git a/include/asm-arm/arch-omap/clock.h b/include/asm-arm/arch-omap/clock.h
index 740c297eb11c..46a0402696de 100644
--- a/include/asm-arm/arch-omap/clock.h
+++ b/include/asm-arm/arch-omap/clock.h
@@ -38,8 +38,6 @@ struct clk {
38struct clk_functions { 38struct clk_functions {
39 int (*clk_enable)(struct clk *clk); 39 int (*clk_enable)(struct clk *clk);
40 void (*clk_disable)(struct clk *clk); 40 void (*clk_disable)(struct clk *clk);
41 int (*clk_use)(struct clk *clk);
42 void (*clk_unuse)(struct clk *clk);
43 long (*clk_round_rate)(struct clk *clk, unsigned long rate); 41 long (*clk_round_rate)(struct clk *clk, unsigned long rate);
44 int (*clk_set_rate)(struct clk *clk, unsigned long rate); 42 int (*clk_set_rate)(struct clk *clk, unsigned long rate);
45 int (*clk_set_parent)(struct clk *clk, struct clk *parent); 43 int (*clk_set_parent)(struct clk *clk, struct clk *parent);
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index dae138b9cac5..1409c5bd703f 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -108,6 +108,7 @@
108#define DCSR_STARTINTR (1 << 1) /* Start Interrupt (read / write) */ 108#define DCSR_STARTINTR (1 << 1) /* Start Interrupt (read / write) */
109#define DCSR_BUSERR (1 << 0) /* Bus Error Interrupt (read / write) */ 109#define DCSR_BUSERR (1 << 0) /* Bus Error Interrupt (read / write) */
110 110
111#define DALGN __REG(0x400000a0) /* DMA Alignment Register */
111#define DINT __REG(0x400000f0) /* DMA Interrupt Register */ 112#define DINT __REG(0x400000f0) /* DMA Interrupt Register */
112 113
113#define DRCMR(n) __REG2(0x40000100, (n)<<2) 114#define DRCMR(n) __REG2(0x40000100, (n)<<2)
@@ -1614,8 +1615,21 @@
1614#define SSCR0_National (0x2 << 4) /* National Microwire */ 1615#define SSCR0_National (0x2 << 4) /* National Microwire */
1615#define SSCR0_ECS (1 << 6) /* External clock select */ 1616#define SSCR0_ECS (1 << 6) /* External clock select */
1616#define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */ 1617#define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */
1618#if defined(CONFIG_PXA25x)
1617#define SSCR0_SCR (0x0000ff00) /* Serial Clock Rate (mask) */ 1619#define SSCR0_SCR (0x0000ff00) /* Serial Clock Rate (mask) */
1618#define SSCR0_SerClkDiv(x) ((((x) - 2)/2) << 8) /* Divisor [2..512] */ 1620#define SSCR0_SerClkDiv(x) ((((x) - 2)/2) << 8) /* Divisor [2..512] */
1621#elif defined(CONFIG_PXA27x)
1622#define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */
1623#define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */
1624#define SSCR0_EDSS (1 << 20) /* Extended data size select */
1625#define SSCR0_NCS (1 << 21) /* Network clock select */
1626#define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */
1627#define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */
1628#define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */
1629#define SSCR0_SlotsPerFrm(c) ((x) - 1) /* Time slots per frame [1..8] */
1630#define SSCR0_ADC (1 << 30) /* Audio clock select */
1631#define SSCR0_MOD (1 << 31) /* Mode (normal or network) */
1632#endif
1619 1633
1620#define SSCR1_RIE (1 << 0) /* Receive FIFO Interrupt Enable */ 1634#define SSCR1_RIE (1 << 0) /* Receive FIFO Interrupt Enable */
1621#define SSCR1_TIE (1 << 1) /* Transmit FIFO Interrupt Enable */ 1635#define SSCR1_TIE (1 << 1) /* Transmit FIFO Interrupt Enable */
diff --git a/include/asm-frv/thread_info.h b/include/asm-frv/thread_info.h
index a5576e02dd1d..ea426abf01d3 100644
--- a/include/asm-frv/thread_info.h
+++ b/include/asm-frv/thread_info.h
@@ -129,6 +129,7 @@ register struct thread_info *__current_thread_info asm("gr15");
129#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 129#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
130#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ 130#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */
131#define TIF_IRET 5 /* return with iret */ 131#define TIF_IRET 5 /* return with iret */
132#define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */
132#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 133#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
133#define TIF_MEMDIE 17 /* OOM killer killed process */ 134#define TIF_MEMDIE 17 /* OOM killer killed process */
134 135
@@ -138,6 +139,7 @@ register struct thread_info *__current_thread_info asm("gr15");
138#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 139#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
139#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) 140#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
140#define _TIF_IRET (1 << TIF_IRET) 141#define _TIF_IRET (1 << TIF_IRET)
142#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
141#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) 143#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
142 144
143#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ 145#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h
index cde376a7a857..4d994d2e99e3 100644
--- a/include/asm-frv/unistd.h
+++ b/include/asm-frv/unistd.h
@@ -486,6 +486,7 @@ static inline pid_t wait(int * wait_stat)
486/* #define __ARCH_WANT_SYS_SIGPENDING */ 486/* #define __ARCH_WANT_SYS_SIGPENDING */
487#define __ARCH_WANT_SYS_SIGPROCMASK 487#define __ARCH_WANT_SYS_SIGPROCMASK
488#define __ARCH_WANT_SYS_RT_SIGACTION 488#define __ARCH_WANT_SYS_RT_SIGACTION
489#define __ARCH_WANT_SYS_RT_SIGSUSPEND
489#endif 490#endif
490 491
491/* 492/*
diff --git a/include/asm-i386/edac.h b/include/asm-i386/edac.h
new file mode 100644
index 000000000000..3e7dd0ab68ce
--- /dev/null
+++ b/include/asm-i386/edac.h
@@ -0,0 +1,18 @@
1#ifndef ASM_EDAC_H
2#define ASM_EDAC_H
3
4/* ECC atomic, DMA, SMP and interrupt safe scrub function */
5
6static __inline__ void atomic_scrub(void *va, u32 size)
7{
8 unsigned long *virt_addr = va;
9 u32 i;
10
11 for (i = 0; i < size / 4; i++, virt_addr++)
12 /* Very carefully read and write to memory atomically
13 * so we are interrupt, DMA and SMP safe.
14 */
15 __asm__ __volatile__("lock; addl $0, %0"::"m"(*virt_addr));
16}
17
18#endif
diff --git a/include/asm-i386/futex.h b/include/asm-i386/futex.h
index e7a271d39309..44b9db806474 100644
--- a/include/asm-i386/futex.h
+++ b/include/asm-i386/futex.h
@@ -61,7 +61,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
61 if (op == FUTEX_OP_SET) 61 if (op == FUTEX_OP_SET)
62 __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg); 62 __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg);
63 else { 63 else {
64#if !defined(CONFIG_X86_BSWAP) && !defined(CONFIG_UML) 64#ifndef CONFIG_X86_BSWAP
65 if (boot_cpu_data.x86 == 3) 65 if (boot_cpu_data.x86 == 3)
66 ret = -ENOSYS; 66 ret = -ENOSYS;
67 else 67 else
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h
index 76524b4052ac..026fd231488d 100644
--- a/include/asm-i386/signal.h
+++ b/include/asm-i386/signal.h
@@ -218,7 +218,6 @@ static __inline__ int sigfindinword(unsigned long word)
218} 218}
219 219
220struct pt_regs; 220struct pt_regs;
221extern int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
222 221
223#define ptrace_signal_deliver(regs, cookie) \ 222#define ptrace_signal_deliver(regs, cookie) \
224 do { \ 223 do { \
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h
index 2493e77e8c30..e20e99551d71 100644
--- a/include/asm-i386/thread_info.h
+++ b/include/asm-i386/thread_info.h
@@ -140,6 +140,7 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__;
140#define TIF_SYSCALL_EMU 6 /* syscall emulation active */ 140#define TIF_SYSCALL_EMU 6 /* syscall emulation active */
141#define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ 141#define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
142#define TIF_SECCOMP 8 /* secure computing */ 142#define TIF_SECCOMP 8 /* secure computing */
143#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */
143#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 144#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
144#define TIF_MEMDIE 17 145#define TIF_MEMDIE 17
145 146
@@ -152,6 +153,7 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__;
152#define _TIF_SYSCALL_EMU (1<<TIF_SYSCALL_EMU) 153#define _TIF_SYSCALL_EMU (1<<TIF_SYSCALL_EMU)
153#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) 154#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
154#define _TIF_SECCOMP (1<<TIF_SECCOMP) 155#define _TIF_SECCOMP (1<<TIF_SECCOMP)
156#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
155#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 157#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
156 158
157/* work to do on interrupt/exception return */ 159/* work to do on interrupt/exception return */
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index 481c3c0ea720..597496ed2aee 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -300,8 +300,23 @@
300#define __NR_inotify_add_watch 292 300#define __NR_inotify_add_watch 292
301#define __NR_inotify_rm_watch 293 301#define __NR_inotify_rm_watch 293
302#define __NR_migrate_pages 294 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_newfstatat 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
303 318
304#define NR_syscalls 295 319#define NR_syscalls 310
305 320
306/* 321/*
307 * user-visible error numbers are in the range -1 - -128: see 322 * user-visible error numbers are in the range -1 - -128: see
@@ -417,6 +432,7 @@ __syscall_return(type,__res); \
417#define __ARCH_WANT_SYS_SIGPENDING 432#define __ARCH_WANT_SYS_SIGPENDING
418#define __ARCH_WANT_SYS_SIGPROCMASK 433#define __ARCH_WANT_SYS_SIGPROCMASK
419#define __ARCH_WANT_SYS_RT_SIGACTION 434#define __ARCH_WANT_SYS_RT_SIGACTION
435#define __ARCH_WANT_SYS_RT_SIGSUSPEND
420#endif 436#endif
421 437
422#ifdef __KERNEL_SYSCALLS__ 438#ifdef __KERNEL_SYSCALLS__
diff --git a/include/asm-ia64/semaphore.h b/include/asm-ia64/semaphore.h
index bb8906285fab..f483eeb95dd1 100644
--- a/include/asm-ia64/semaphore.h
+++ b/include/asm-ia64/semaphore.h
@@ -61,7 +61,7 @@ static inline void
61down (struct semaphore *sem) 61down (struct semaphore *sem)
62{ 62{
63 might_sleep(); 63 might_sleep();
64 if (atomic_dec_return(&sem->count) < 0) 64 if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1)
65 __down(sem); 65 __down(sem);
66} 66}
67 67
@@ -75,7 +75,7 @@ down_interruptible (struct semaphore * sem)
75 int ret = 0; 75 int ret = 0;
76 76
77 might_sleep(); 77 might_sleep();
78 if (atomic_dec_return(&sem->count) < 0) 78 if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1)
79 ret = __down_interruptible(sem); 79 ret = __down_interruptible(sem);
80 return ret; 80 return ret;
81} 81}
@@ -85,7 +85,7 @@ down_trylock (struct semaphore *sem)
85{ 85{
86 int ret = 0; 86 int ret = 0;
87 87
88 if (atomic_dec_return(&sem->count) < 0) 88 if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1)
89 ret = __down_trylock(sem); 89 ret = __down_trylock(sem);
90 return ret; 90 return ret;
91} 91}
@@ -93,7 +93,7 @@ down_trylock (struct semaphore *sem)
93static inline void 93static inline void
94up (struct semaphore * sem) 94up (struct semaphore * sem)
95{ 95{
96 if (atomic_inc_return(&sem->count) <= 0) 96 if (ia64_fetchadd(1, &sem->count.counter, rel) <= -1)
97 __up(sem); 97 __up(sem);
98} 98}
99 99
diff --git a/include/asm-ia64/sn/xp.h b/include/asm-ia64/sn/xp.h
index 203945ae034e..9bd2f9bf329b 100644
--- a/include/asm-ia64/sn/xp.h
+++ b/include/asm-ia64/sn/xp.h
@@ -18,6 +18,7 @@
18 18
19#include <linux/cache.h> 19#include <linux/cache.h>
20#include <linux/hardirq.h> 20#include <linux/hardirq.h>
21#include <linux/mutex.h>
21#include <asm/sn/types.h> 22#include <asm/sn/types.h>
22#include <asm/sn/bte.h> 23#include <asm/sn/bte.h>
23 24
@@ -359,7 +360,7 @@ typedef void (*xpc_notify_func)(enum xpc_retval reason, partid_t partid,
359 * the channel. 360 * the channel.
360 */ 361 */
361struct xpc_registration { 362struct xpc_registration {
362 struct semaphore sema; 363 struct mutex mutex;
363 xpc_channel_func func; /* function to call */ 364 xpc_channel_func func; /* function to call */
364 void *key; /* pointer to user's key */ 365 void *key; /* pointer to user's key */
365 u16 nentries; /* #of msg entries in local msg queue */ 366 u16 nentries; /* #of msg entries in local msg queue */
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h
index 87e9cd588510..0c36928ffd8b 100644
--- a/include/asm-ia64/sn/xpc.h
+++ b/include/asm-ia64/sn/xpc.h
@@ -19,6 +19,8 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/sysctl.h> 20#include <linux/sysctl.h>
21#include <linux/device.h> 21#include <linux/device.h>
22#include <linux/mutex.h>
23#include <linux/completion.h>
22#include <asm/pgtable.h> 24#include <asm/pgtable.h>
23#include <asm/processor.h> 25#include <asm/processor.h>
24#include <asm/sn/bte.h> 26#include <asm/sn/bte.h>
@@ -335,8 +337,7 @@ struct xpc_openclose_args {
335 * and consumed by the intended recipient. 337 * and consumed by the intended recipient.
336 */ 338 */
337struct xpc_notify { 339struct xpc_notify {
338 struct semaphore sema; /* notify semaphore */ 340 volatile u8 type; /* type of notification */
339 volatile u8 type; /* type of notification */
340 341
341 /* the following two fields are only used if type == XPC_N_CALL */ 342 /* the following two fields are only used if type == XPC_N_CALL */
342 xpc_notify_func func; /* user's notify function */ 343 xpc_notify_func func; /* user's notify function */
@@ -465,8 +466,8 @@ struct xpc_channel {
465 xpc_channel_func func; /* user's channel function */ 466 xpc_channel_func func; /* user's channel function */
466 void *key; /* pointer to user's key */ 467 void *key; /* pointer to user's key */
467 468
468 struct semaphore msg_to_pull_sema; /* next msg to pull serialization */ 469 struct mutex msg_to_pull_mutex; /* next msg to pull serialization */
469 struct semaphore wdisconnect_sema; /* wait for channel disconnect */ 470 struct completion wdisconnect_wait; /* wait for channel disconnect */
470 471
471 struct xpc_openclose_args *local_openclose_args; /* args passed on */ 472 struct xpc_openclose_args *local_openclose_args; /* args passed on */
472 /* opening or closing of channel */ 473 /* opening or closing of channel */
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h
index d8aae4da3978..412ef8e493a8 100644
--- a/include/asm-ia64/topology.h
+++ b/include/asm-ia64/topology.h
@@ -18,6 +18,10 @@
18#include <asm/smp.h> 18#include <asm/smp.h>
19 19
20#ifdef CONFIG_NUMA 20#ifdef CONFIG_NUMA
21
22/* Nodes w/o CPUs are preferred for memory allocations, see build_zonelists */
23#define PENALTY_FOR_NODE_WITH_CPUS 255
24
21/* 25/*
22 * Returns the number of the node containing CPU 'cpu' 26 * Returns the number of the node containing CPU 'cpu'
23 */ 27 */
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h
index 7e09d7cda933..67cdaf3ae9fc 100644
--- a/include/asm-powerpc/thread_info.h
+++ b/include/asm-powerpc/thread_info.h
@@ -122,6 +122,7 @@ static inline struct thread_info *current_thread_info(void)
122#define TIF_RESTOREALL 12 /* Restore all regs (implies NOERROR) */ 122#define TIF_RESTOREALL 12 /* Restore all regs (implies NOERROR) */
123#define TIF_SAVE_NVGPRS 13 /* Save r14-r31 in signal frame */ 123#define TIF_SAVE_NVGPRS 13 /* Save r14-r31 in signal frame */
124#define TIF_NOERROR 14 /* Force successful syscall return */ 124#define TIF_NOERROR 14 /* Force successful syscall return */
125#define TIF_RESTORE_SIGMASK 15 /* Restore signal mask in do_signal */
125 126
126/* as above, but as bit values */ 127/* as above, but as bit values */
127#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 128#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
@@ -138,10 +139,12 @@ static inline struct thread_info *current_thread_info(void)
138#define _TIF_RESTOREALL (1<<TIF_RESTOREALL) 139#define _TIF_RESTOREALL (1<<TIF_RESTOREALL)
139#define _TIF_SAVE_NVGPRS (1<<TIF_SAVE_NVGPRS) 140#define _TIF_SAVE_NVGPRS (1<<TIF_SAVE_NVGPRS)
140#define _TIF_NOERROR (1<<TIF_NOERROR) 141#define _TIF_NOERROR (1<<TIF_NOERROR)
142#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
141#define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP) 143#define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP)
142 144
143#define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ 145#define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \
144 _TIF_NEED_RESCHED | _TIF_RESTOREALL) 146 _TIF_NEED_RESCHED | _TIF_RESTOREALL | \
147 _TIF_RESTORE_SIGMASK)
145#define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR|_TIF_SAVE_NVGPRS) 148#define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR|_TIF_SAVE_NVGPRS)
146 149
147#endif /* __KERNEL__ */ 150#endif /* __KERNEL__ */
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h
index 19eaac3fbbf9..a40cdff21a88 100644
--- a/include/asm-powerpc/unistd.h
+++ b/include/asm-powerpc/unistd.h
@@ -298,8 +298,10 @@
298#define __NR_inotify_rm_watch 277 298#define __NR_inotify_rm_watch 277
299#define __NR_spu_run 278 299#define __NR_spu_run 278
300#define __NR_spu_create 279 300#define __NR_spu_create 279
301#define __NR_pselect6 280
302#define __NR_ppoll 281
301 303
302#define __NR_syscalls 280 304#define __NR_syscalls 282
303 305
304#ifdef __KERNEL__ 306#ifdef __KERNEL__
305#define __NR__exit __NR_exit 307#define __NR__exit __NR_exit
@@ -444,11 +446,13 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
444#define __ARCH_WANT_SYS_SIGPENDING 446#define __ARCH_WANT_SYS_SIGPENDING
445#define __ARCH_WANT_SYS_SIGPROCMASK 447#define __ARCH_WANT_SYS_SIGPROCMASK
446#define __ARCH_WANT_SYS_RT_SIGACTION 448#define __ARCH_WANT_SYS_RT_SIGACTION
449#define __ARCH_WANT_SYS_RT_SIGSUSPEND
447#ifdef CONFIG_PPC32 450#ifdef CONFIG_PPC32
448#define __ARCH_WANT_OLD_STAT 451#define __ARCH_WANT_OLD_STAT
449#endif 452#endif
450#ifdef CONFIG_PPC64 453#ifdef CONFIG_PPC64
451#define __ARCH_WANT_COMPAT_SYS_TIME 454#define __ARCH_WANT_COMPAT_SYS_TIME
455#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
452#endif 456#endif
453 457
454/* 458/*
diff --git a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h
index 95944556d8b6..d0d76b30eb4c 100644
--- a/include/asm-sparc/oplib.h
+++ b/include/asm-sparc/oplib.h
@@ -164,6 +164,7 @@ enum prom_input_device {
164 PROMDEV_IKBD, /* input from keyboard */ 164 PROMDEV_IKBD, /* input from keyboard */
165 PROMDEV_ITTYA, /* input from ttya */ 165 PROMDEV_ITTYA, /* input from ttya */
166 PROMDEV_ITTYB, /* input from ttyb */ 166 PROMDEV_ITTYB, /* input from ttyb */
167 PROMDEV_IRSC, /* input from rsc */
167 PROMDEV_I_UNK, 168 PROMDEV_I_UNK,
168}; 169};
169 170
@@ -175,6 +176,7 @@ enum prom_output_device {
175 PROMDEV_OSCREEN, /* to screen */ 176 PROMDEV_OSCREEN, /* to screen */
176 PROMDEV_OTTYA, /* to ttya */ 177 PROMDEV_OTTYA, /* to ttya */
177 PROMDEV_OTTYB, /* to ttyb */ 178 PROMDEV_OTTYB, /* to ttyb */
179 PROMDEV_ORSC, /* to rsc */
178 PROMDEV_O_UNK, 180 PROMDEV_O_UNK,
179}; 181};
180 182
diff --git a/include/asm-sparc/thread_info.h b/include/asm-sparc/thread_info.h
index 65f060b040ab..91b9f5888c85 100644
--- a/include/asm-sparc/thread_info.h
+++ b/include/asm-sparc/thread_info.h
@@ -128,9 +128,10 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
128 * thread information flag bit numbers 128 * thread information flag bit numbers
129 */ 129 */
130#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 130#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
131#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ 131/* flag bit 1 is available */
132#define TIF_SIGPENDING 2 /* signal pending */ 132#define TIF_SIGPENDING 2 /* signal pending */
133#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 133#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
134#define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */
134#define TIF_USEDFPU 8 /* FPU was used by this task 135#define TIF_USEDFPU 8 /* FPU was used by this task
135 * this quantum (SMP) */ 136 * this quantum (SMP) */
136#define TIF_POLLING_NRFLAG 9 /* true if poll_idle() is polling 137#define TIF_POLLING_NRFLAG 9 /* true if poll_idle() is polling
@@ -139,9 +140,9 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
139 140
140/* as above, but as bit values */ 141/* as above, but as bit values */
141#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 142#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
142#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
143#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 143#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
144#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 144#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
145#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
145#define _TIF_USEDFPU (1<<TIF_USEDFPU) 146#define _TIF_USEDFPU (1<<TIF_USEDFPU)
146#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 147#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
147 148
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h
index 58dba518239e..2ac64e65e336 100644
--- a/include/asm-sparc/unistd.h
+++ b/include/asm-sparc/unistd.h
@@ -300,11 +300,26 @@
300#define __NR_add_key 281 300#define __NR_add_key 281
301#define __NR_request_key 282 301#define __NR_request_key 282
302#define __NR_keyctl 283 302#define __NR_keyctl 283
303#define __NR_openat 284
304#define __NR_mkdirat 285
305#define __NR_mknodat 286
306#define __NR_fchownat 287
307#define __NR_futimesat 288
308#define __NR_newfstatat 289
309#define __NR_unlinkat 290
310#define __NR_renameat 291
311#define __NR_linkat 292
312#define __NR_symlinkat 293
313#define __NR_readlinkat 294
314#define __NR_fchmodat 295
315#define __NR_faccessat 296
316#define __NR_pselect6 297
317#define __NR_ppoll 298
303 318
304/* WARNING: You MAY NOT add syscall numbers larger than 283, since 319/* WARNING: You MAY NOT add syscall numbers larger than 298, since
305 * all of the syscall tables in the Sparc kernel are 320 * all of the syscall tables in the Sparc kernel are
306 * sized to have 283 entries (starting at zero). Therefore 321 * sized to have 298 entries (starting at zero). Therefore
307 * find a free slot in the 0-282 range. 322 * find a free slot in the 0-298 range.
308 */ 323 */
309 324
310#define _syscall0(type,name) \ 325#define _syscall0(type,name) \
@@ -458,6 +473,7 @@ return -1; \
458#define __ARCH_WANT_SYS_OLDUMOUNT 473#define __ARCH_WANT_SYS_OLDUMOUNT
459#define __ARCH_WANT_SYS_SIGPENDING 474#define __ARCH_WANT_SYS_SIGPENDING
460#define __ARCH_WANT_SYS_SIGPROCMASK 475#define __ARCH_WANT_SYS_SIGPROCMASK
476#define __ARCH_WANT_SYS_RT_SIGSUSPEND
461#endif 477#endif
462 478
463#ifdef __KERNEL_SYSCALLS__ 479#ifdef __KERNEL_SYSCALLS__
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h
index d02f1e8ae1a6..3c59b2693fb9 100644
--- a/include/asm-sparc64/oplib.h
+++ b/include/asm-sparc64/oplib.h
@@ -163,6 +163,7 @@ enum prom_input_device {
163 PROMDEV_IKBD, /* input from keyboard */ 163 PROMDEV_IKBD, /* input from keyboard */
164 PROMDEV_ITTYA, /* input from ttya */ 164 PROMDEV_ITTYA, /* input from ttya */
165 PROMDEV_ITTYB, /* input from ttyb */ 165 PROMDEV_ITTYB, /* input from ttyb */
166 PROMDEV_IRSC, /* input from rsc */
166 PROMDEV_I_UNK, 167 PROMDEV_I_UNK,
167}; 168};
168 169
@@ -174,6 +175,7 @@ enum prom_output_device {
174 PROMDEV_OSCREEN, /* to screen */ 175 PROMDEV_OSCREEN, /* to screen */
175 PROMDEV_OTTYA, /* to ttya */ 176 PROMDEV_OTTYA, /* to ttya */
176 PROMDEV_OTTYB, /* to ttyb */ 177 PROMDEV_OTTYB, /* to ttyb */
178 PROMDEV_ORSC, /* to rsc */
177 PROMDEV_O_UNK, 179 PROMDEV_O_UNK,
178}; 180};
179 181
diff --git a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h
index c94d8b3991bd..ac9d068aab4f 100644
--- a/include/asm-sparc64/thread_info.h
+++ b/include/asm-sparc64/thread_info.h
@@ -221,7 +221,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
221 * nop 221 * nop
222 */ 222 */
223#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 223#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
224#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ 224#define TIF_RESTORE_SIGMASK 1 /* restore signal mask in do_signal() */
225#define TIF_SIGPENDING 2 /* signal pending */ 225#define TIF_SIGPENDING 2 /* signal pending */
226#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 226#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
227#define TIF_PERFCTR 4 /* performance counters active */ 227#define TIF_PERFCTR 4 /* performance counters active */
@@ -241,7 +241,6 @@ register struct thread_info *current_thread_info_reg asm("g6");
241#define TIF_POLLING_NRFLAG 14 241#define TIF_POLLING_NRFLAG 14
242 242
243#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 243#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
244#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
245#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 244#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
246#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 245#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
247#define _TIF_PERFCTR (1<<TIF_PERFCTR) 246#define _TIF_PERFCTR (1<<TIF_PERFCTR)
@@ -250,11 +249,12 @@ register struct thread_info *current_thread_info_reg asm("g6");
250#define _TIF_32BIT (1<<TIF_32BIT) 249#define _TIF_32BIT (1<<TIF_32BIT)
251#define _TIF_SECCOMP (1<<TIF_SECCOMP) 250#define _TIF_SECCOMP (1<<TIF_SECCOMP)
252#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) 251#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
252#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
253#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) 253#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
254#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 254#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
255 255
256#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ 256#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \
257 (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ 257 (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | \
258 _TIF_NEED_RESCHED | _TIF_PERFCTR)) 258 _TIF_NEED_RESCHED | _TIF_PERFCTR))
259 259
260#endif /* __KERNEL__ */ 260#endif /* __KERNEL__ */
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
index 51ec2879b881..84ac2bdb0902 100644
--- a/include/asm-sparc64/unistd.h
+++ b/include/asm-sparc64/unistd.h
@@ -302,11 +302,26 @@
302#define __NR_add_key 281 302#define __NR_add_key 281
303#define __NR_request_key 282 303#define __NR_request_key 282
304#define __NR_keyctl 283 304#define __NR_keyctl 283
305#define __NR_openat 284
306#define __NR_mkdirat 285
307#define __NR_mknodat 286
308#define __NR_fchownat 287
309#define __NR_futimesat 288
310#define __NR_newfstatat 289
311#define __NR_unlinkat 290
312#define __NR_renameat 291
313#define __NR_linkat 292
314#define __NR_symlinkat 293
315#define __NR_readlinkat 294
316#define __NR_fchmodat 295
317#define __NR_faccessat 296
318#define __NR_pselect6 297
319#define __NR_ppoll 298
305 320
306/* WARNING: You MAY NOT add syscall numbers larger than 283, since 321/* WARNING: You MAY NOT add syscall numbers larger than 298, since
307 * all of the syscall tables in the Sparc kernel are 322 * all of the syscall tables in the Sparc kernel are
308 * sized to have 283 entries (starting at zero). Therefore 323 * sized to have 298 entries (starting at zero). Therefore
309 * find a free slot in the 0-282 range. 324 * find a free slot in the 0-298 range.
310 */ 325 */
311 326
312#define _syscall0(type,name) \ 327#define _syscall0(type,name) \
@@ -501,6 +516,8 @@ asmlinkage long sys_rt_sigaction(int sig,
501#define __ARCH_WANT_SYS_OLDUMOUNT 516#define __ARCH_WANT_SYS_OLDUMOUNT
502#define __ARCH_WANT_SYS_SIGPENDING 517#define __ARCH_WANT_SYS_SIGPENDING
503#define __ARCH_WANT_SYS_SIGPROCMASK 518#define __ARCH_WANT_SYS_SIGPROCMASK
519#define __ARCH_WANT_SYS_RT_SIGSUSPEND
520#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
504#endif 521#endif
505 522
506/* 523/*
diff --git a/include/asm-um/io.h b/include/asm-um/io.h
index 90674056dcef..1934d9340e2c 100644
--- a/include/asm-um/io.h
+++ b/include/asm-um/io.h
@@ -33,4 +33,20 @@ static inline void * phys_to_virt(unsigned long address)
33 */ 33 */
34#define xlate_dev_kmem_ptr(p) p 34#define xlate_dev_kmem_ptr(p) p
35 35
36static inline void writeb(unsigned char b, volatile void __iomem *addr)
37{
38 *(volatile unsigned char __force *) addr = b;
39}
40static inline void writew(unsigned short b, volatile void __iomem *addr)
41{
42 *(volatile unsigned short __force *) addr = b;
43}
44static inline void writel(unsigned int b, volatile void __iomem *addr)
45{
46 *(volatile unsigned int __force *) addr = b;
47}
48#define __raw_writeb writeb
49#define __raw_writew writew
50#define __raw_writel writel
51
36#endif 52#endif
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h
index 705c71972c32..17b6b07c4332 100644
--- a/include/asm-um/thread_info.h
+++ b/include/asm-um/thread_info.h
@@ -69,6 +69,7 @@ static inline struct thread_info *current_thread_info(void)
69#define TIF_RESTART_BLOCK 4 69#define TIF_RESTART_BLOCK 4
70#define TIF_MEMDIE 5 70#define TIF_MEMDIE 5
71#define TIF_SYSCALL_AUDIT 6 71#define TIF_SYSCALL_AUDIT 6
72#define TIF_RESTORE_SIGMASK 7
72 73
73#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 74#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
74#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 75#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
@@ -76,16 +77,6 @@ static inline struct thread_info *current_thread_info(void)
76#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) 77#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
77#define _TIF_MEMDIE (1 << TIF_MEMDIE) 78#define _TIF_MEMDIE (1 << TIF_MEMDIE)
78#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) 79#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
80#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
79 81
80#endif 82#endif
81
82/*
83 * Overrides for Emacs so that we follow Linus's tabbing style.
84 * Emacs will notice this stuff at the end of the file and automatically
85 * adjust the settings for this buffer only. This must remain at the end
86 * of the file.
87 * ---------------------------------------------------------------------------
88 * Local variables:
89 * c-file-style: "linux"
90 * End:
91 */
diff --git a/include/asm-um/unistd.h b/include/asm-um/unistd.h
index 6fdde45cc053..afccfcaa9ea9 100644
--- a/include/asm-um/unistd.h
+++ b/include/asm-um/unistd.h
@@ -34,6 +34,7 @@ extern int um_execve(const char *file, char *const argv[], char *const env[]);
34#define __ARCH_WANT_SYS_SIGPENDING 34#define __ARCH_WANT_SYS_SIGPENDING
35#define __ARCH_WANT_SYS_SIGPROCMASK 35#define __ARCH_WANT_SYS_SIGPROCMASK
36#define __ARCH_WANT_SYS_RT_SIGACTION 36#define __ARCH_WANT_SYS_RT_SIGACTION
37#define __ARCH_WANT_SYS_RT_SIGSUSPEND
37#endif 38#endif
38 39
39#ifdef __KERNEL_SYSCALLS__ 40#ifdef __KERNEL_SYSCALLS__
diff --git a/include/asm-x86_64/edac.h b/include/asm-x86_64/edac.h
new file mode 100644
index 000000000000..cad1cd42b4ee
--- /dev/null
+++ b/include/asm-x86_64/edac.h
@@ -0,0 +1,18 @@
1#ifndef ASM_EDAC_H
2#define ASM_EDAC_H
3
4/* ECC atomic, DMA, SMP and interrupt safe scrub function */
5
6static __inline__ void atomic_scrub(void *va, u32 size)
7{
8 unsigned int *virt_addr = va;
9 u32 i;
10
11 for (i = 0; i < size / 4; i++, virt_addr++)
12 /* Very carefully read and write to memory atomically
13 * so we are interrupt, DMA and SMP safe.
14 */
15 __asm__ __volatile__("lock; addl $0, %0"::"m"(*virt_addr));
16}
17
18#endif
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h
index e8843362a6cc..e87cd83a0e86 100644
--- a/include/asm-x86_64/ia32_unistd.h
+++ b/include/asm-x86_64/ia32_unistd.h
@@ -300,7 +300,20 @@
300#define __NR_ia32_inotify_add_watch 292 300#define __NR_ia32_inotify_add_watch 292
301#define __NR_ia32_inotify_rm_watch 293 301#define __NR_ia32_inotify_rm_watch 293
302#define __NR_ia32_migrate_pages 294 302#define __NR_ia32_migrate_pages 294
303#define __NR_ia32_opanat 295
304#define __NR_ia32_mkdirat 296
305#define __NR_ia32_mknodat 297
306#define __NR_ia32_fchownat 298
307#define __NR_ia32_futimesat 299
308#define __NR_ia32_newfstatat 300
309#define __NR_ia32_unlinkat 301
310#define __NR_ia32_renameat 302
311#define __NR_ia32_linkat 303
312#define __NR_ia32_symlinkat 304
313#define __NR_ia32_readlinkat 305
314#define __NR_ia32_fchmodat 306
315#define __NR_ia32_faccessat 307
303 316
304#define IA32_NR_syscalls 295 /* must be > than biggest syscall! */ 317#define IA32_NR_syscalls 308 /* must be > than biggest syscall! */
305 318
306#endif /* _ASM_X86_64_IA32_UNISTD_H_ */ 319#endif /* _ASM_X86_64_IA32_UNISTD_H_ */
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
index e6f896161c11..436d099b5b6b 100644
--- a/include/asm-x86_64/unistd.h
+++ b/include/asm-x86_64/unistd.h
@@ -573,8 +573,35 @@ __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch)
573__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) 573__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
574#define __NR_migrate_pages 256 574#define __NR_migrate_pages 256
575__SYSCALL(__NR_migrate_pages, sys_migrate_pages) 575__SYSCALL(__NR_migrate_pages, sys_migrate_pages)
576#define __NR_openat 257
577__SYSCALL(__NR_openat, sys_openat)
578#define __NR_mkdirat 258
579__SYSCALL(__NR_mkdirat, sys_mkdirat)
580#define __NR_mknodat 259
581__SYSCALL(__NR_mknodat, sys_mknodat)
582#define __NR_fchownat 260
583__SYSCALL(__NR_fchownat, sys_fchownat)
584#define __NR_futimesat 261
585__SYSCALL(__NR_futimesat, sys_futimesat)
586#define __NR_newfstatat 262
587__SYSCALL(__NR_newfstatat, sys_newfstatat)
588#define __NR_unlinkat 263
589__SYSCALL(__NR_unlinkat, sys_unlinkat)
590#define __NR_renameat 264
591__SYSCALL(__NR_renameat, sys_renameat)
592#define __NR_linkat 265
593__SYSCALL(__NR_linkat, sys_linkat)
594#define __NR_symlinkat 266
595__SYSCALL(__NR_symlinkat, sys_symlinkat)
596#define __NR_readlinkat 267
597__SYSCALL(__NR_readlinkat, sys_readlinkat)
598#define __NR_fchmodat 268
599__SYSCALL(__NR_fchmodat, sys_fchmodat)
600#define __NR_faccessat 269
601__SYSCALL(__NR_faccessat, sys_faccessat)
602
603#define __NR_syscall_max __NR_faccessat
576 604
577#define __NR_syscall_max __NR_migrate_pages
578#ifndef __NO_STUBS 605#ifndef __NO_STUBS
579 606
580/* user-visible error numbers are in the range -1 - -4095 */ 607/* user-visible error numbers are in the range -1 - -4095 */
diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h
index 8a7c82151de9..c52a63755fdd 100644
--- a/include/linux/fcntl.h
+++ b/include/linux/fcntl.h
@@ -23,6 +23,13 @@
23#define DN_ATTRIB 0x00000020 /* File changed attibutes */ 23#define DN_ATTRIB 0x00000020 /* File changed attibutes */
24#define DN_MULTISHOT 0x80000000 /* Don't remove notifier */ 24#define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
25 25
26#define AT_FDCWD -100 /* Special value used to indicate
27 openat should use the current
28 working directory. */
29#define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
30#define AT_REMOVEDIR 0x200 /* Remove directory instead of
31 unlinking file. */
32
26#ifdef __KERNEL__ 33#ifdef __KERNEL__
27 34
28#ifndef force_o_largefile 35#ifndef force_o_largefile
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b77f2608eef9..84bb449b9b01 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1340,7 +1340,8 @@ static inline int break_lease(struct inode *inode, unsigned int mode)
1340 1340
1341extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, 1341extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
1342 struct file *filp); 1342 struct file *filp);
1343extern long do_sys_open(const char __user *filename, int flags, int mode); 1343extern long do_sys_open(int fdf, const char __user *filename, int flags,
1344 int mode);
1344extern struct file *filp_open(const char *, int, int); 1345extern struct file *filp_open(const char *, int, int);
1345extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); 1346extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
1346extern int filp_close(struct file *, fl_owner_t id); 1347extern int filp_close(struct file *, fl_owner_t id);
@@ -1479,7 +1480,7 @@ static inline void allow_write_access(struct file *file)
1479} 1480}
1480extern int do_pipe(int *); 1481extern int do_pipe(int *);
1481 1482
1482extern int open_namei(const char *, int, int, struct nameidata *); 1483extern int open_namei(int dfd, const char *, int, int, struct nameidata *);
1483extern int may_open(struct nameidata *, int, int); 1484extern int may_open(struct nameidata *, int, int);
1484 1485
1485extern int kernel_read(struct file *, unsigned long, char *, unsigned long); 1486extern int kernel_read(struct file *, unsigned long, char *, unsigned long);
@@ -1677,6 +1678,8 @@ extern int vfs_readdir(struct file *, filldir_t, void *);
1677 1678
1678extern int vfs_stat(char __user *, struct kstat *); 1679extern int vfs_stat(char __user *, struct kstat *);
1679extern int vfs_lstat(char __user *, struct kstat *); 1680extern int vfs_lstat(char __user *, struct kstat *);
1681extern int vfs_stat_fd(int dfd, char __user *, struct kstat *);
1682extern int vfs_lstat_fd(int dfd, char __user *, struct kstat *);
1680extern int vfs_fstat(unsigned int, struct kstat *); 1683extern int vfs_fstat(unsigned int, struct kstat *);
1681 1684
1682extern int vfs_ioctl(struct file *, unsigned int, unsigned int, unsigned long); 1685extern int vfs_ioctl(struct file *, unsigned int, unsigned int, unsigned long);
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index fe26d431de87..7a92c1ce1457 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -72,6 +72,7 @@
72 * over Ethernet 72 * over Ethernet
73 */ 73 */
74#define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ 74#define ETH_P_AOE 0x88A2 /* ATA over Ethernet */
75#define ETH_P_TIPC 0x88CA /* TIPC */
75 76
76/* 77/*
77 * Non DIX types. Won't clash for 1500 types. 78 * Non DIX types. Won't clash for 1500 types.
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index d6a53ed6ab6c..bbd2221923c3 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -159,6 +159,7 @@ extern void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new);
159extern struct mempolicy default_policy; 159extern struct mempolicy default_policy;
160extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, 160extern struct zonelist *huge_zonelist(struct vm_area_struct *vma,
161 unsigned long addr); 161 unsigned long addr);
162extern unsigned slab_node(struct mempolicy *policy);
162 163
163extern int policy_zone; 164extern int policy_zone;
164 165
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index 49cc68af01f8..8ac854f7f190 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -39,24 +39,3 @@ del_page_from_lru(struct zone *zone, struct page *page)
39 } 39 }
40} 40}
41 41
42/*
43 * Isolate one page from the LRU lists.
44 *
45 * - zone->lru_lock must be held
46 */
47static inline int __isolate_lru_page(struct page *page)
48{
49 if (unlikely(!TestClearPageLRU(page)))
50 return 0;
51
52 if (get_page_testone(page)) {
53 /*
54 * It is being freed elsewhere
55 */
56 __put_page(page);
57 SetPageLRU(page);
58 return -ENOENT;
59 }
60
61 return 1;
62}
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 34cbefd2ebde..93a849f742db 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -149,15 +149,17 @@ struct zone {
149 unsigned long pages_scanned; /* since last reclaim */ 149 unsigned long pages_scanned; /* since last reclaim */
150 int all_unreclaimable; /* All pages pinned */ 150 int all_unreclaimable; /* All pages pinned */
151 151
152 /*
153 * Does the allocator try to reclaim pages from the zone as soon
154 * as it fails a watermark_ok() in __alloc_pages?
155 */
156 int reclaim_pages;
157 /* A count of how many reclaimers are scanning this zone */ 152 /* A count of how many reclaimers are scanning this zone */
158 atomic_t reclaim_in_progress; 153 atomic_t reclaim_in_progress;
159 154
160 /* 155 /*
156 * timestamp (in jiffies) of the last zone reclaim that did not
157 * result in freeing of pages. This is used to avoid repeated scans
158 * if all memory in the zone is in use.
159 */
160 unsigned long last_unsuccessful_zone_reclaim;
161
162 /*
161 * prev_priority holds the scanning priority for this zone. It is 163 * prev_priority holds the scanning priority for this zone. It is
162 * defined as the scanning priority at which we achieved our reclaim 164 * defined as the scanning priority at which we achieved our reclaim
163 * target at the previous try_to_free_pages() or balance_pgdat() 165 * target at the previous try_to_free_pages() or balance_pgdat()
diff --git a/include/linux/namei.h b/include/linux/namei.h
index b699e427c00c..e6698013e4d0 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -56,10 +56,11 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
56#define LOOKUP_ACCESS (0x0400) 56#define LOOKUP_ACCESS (0x0400)
57 57
58extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); 58extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *));
59extern int FASTCALL(__user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *));
59#define user_path_walk(name,nd) \ 60#define user_path_walk(name,nd) \
60 __user_walk(name, LOOKUP_FOLLOW, nd) 61 __user_walk_fd(AT_FDCWD, name, LOOKUP_FOLLOW, nd)
61#define user_path_walk_link(name,nd) \ 62#define user_path_walk_link(name,nd) \
62 __user_walk(name, 0, nd) 63 __user_walk_fd(AT_FDCWD, name, 0, nd)
63extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *)); 64extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *));
64extern int FASTCALL(path_walk(const char *, struct nameidata *)); 65extern int FASTCALL(path_walk(const char *, struct nameidata *));
65extern int FASTCALL(link_path_walk(const char *, struct nameidata *)); 66extern int FASTCALL(link_path_walk(const char *, struct nameidata *));
@@ -67,7 +68,7 @@ extern void path_release(struct nameidata *);
67extern void path_release_on_umount(struct nameidata *); 68extern void path_release_on_umount(struct nameidata *);
68 69
69extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags); 70extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags);
70extern int path_lookup_open(const char *, unsigned lookup_flags, struct nameidata *, int open_flags); 71extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags);
71extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, 72extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
72 int (*open)(struct inode *, struct file *)); 73 int (*open)(struct inode *, struct file *));
73extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); 74extern struct file *nameidata_to_filp(struct nameidata *nd, int flags);
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 472f04834809..59ff6c430cf6 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -19,7 +19,7 @@ struct xt_get_revision
19/* For standard target */ 19/* For standard target */
20#define XT_RETURN (-NF_REPEAT - 1) 20#define XT_RETURN (-NF_REPEAT - 1)
21 21
22#define XT_ALIGN(s) (((s) + (__alignof__(void *)-1)) & ~(__alignof__(void *)-1)) 22#define XT_ALIGN(s) (((s) + (__alignof__(u_int64_t)-1)) & ~(__alignof__(u_int64_t)-1))
23 23
24/* Standard return verdict, or do jump. */ 24/* Standard return verdict, or do jump. */
25#define XT_STANDARD_TARGET "" 25#define XT_STANDARD_TARGET ""
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index 51c231a1e5a6..ec7c2e872d72 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -124,7 +124,7 @@ int nfsd_statfs(struct svc_rqst *, struct svc_fh *,
124 124
125int nfsd_notify_change(struct inode *, struct iattr *); 125int nfsd_notify_change(struct inode *, struct iattr *);
126int nfsd_permission(struct svc_export *, struct dentry *, int); 126int nfsd_permission(struct svc_export *, struct dentry *, int);
127void nfsd_sync_dir(struct dentry *dp); 127int nfsd_sync_dir(struct dentry *dp);
128 128
129#if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) 129#if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
130#ifdef CONFIG_NFSD_V2_ACL 130#ifdef CONFIG_NFSD_V2_ACL
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h
index 8903688890ce..77adba7d2281 100644
--- a/include/linux/nfsd/xdr4.h
+++ b/include/linux/nfsd/xdr4.h
@@ -145,8 +145,9 @@ struct nfsd4_lock {
145 } ok; 145 } ok;
146 struct nfsd4_lock_denied denied; 146 struct nfsd4_lock_denied denied;
147 } u; 147 } u;
148 148 /* The lk_replay_owner is the open owner in the open_to_lock_owner
149 struct nfs4_stateowner *lk_stateowner; 149 * case and the lock owner otherwise: */
150 struct nfs4_stateowner *lk_replay_owner;
150}; 151};
151#define lk_new_open_seqid v.new.open_seqid 152#define lk_new_open_seqid v.new.open_seqid
152#define lk_new_open_stateid v.new.open_stateid 153#define lk_new_open_stateid v.new.open_stateid
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 5403257ae3e7..ecc1fc1f0f04 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1992,6 +1992,7 @@
1992#define PCI_VENDOR_ID_DCI 0x6666 1992#define PCI_VENDOR_ID_DCI 0x6666
1993#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 1993#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001
1994#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 1994#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002
1995#define PCI_DEVICE_ID_DCI_PCCOM2 0x0004
1995 1996
1996#define PCI_VENDOR_ID_INTEL 0x8086 1997#define PCI_VENDOR_ID_INTEL 0x8086
1997#define PCI_DEVICE_ID_INTEL_EESSC 0x0008 1998#define PCI_DEVICE_ID_INTEL_EESSC 0x0008
diff --git a/include/linux/poll.h b/include/linux/poll.h
index f6da702088f4..8e8f6098508a 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -92,7 +92,11 @@ void zero_fd_set(unsigned long nr, unsigned long *fdset)
92 memset(fdset, 0, FDS_BYTES(nr)); 92 memset(fdset, 0, FDS_BYTES(nr));
93} 93}
94 94
95extern int do_select(int n, fd_set_bits *fds, long *timeout); 95#define MAX_INT64_SECONDS (((s64)(~((u64)0)>>1)/HZ)-1)
96
97extern int do_select(int n, fd_set_bits *fds, s64 *timeout);
98extern int do_sys_poll(struct pollfd __user * ufds, unsigned int nfds,
99 s64 *timeout);
96 100
97#endif /* KERNEL */ 101#endif /* KERNEL */
98 102
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2df1a1a2fee5..0cfcd1c7865e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -809,6 +809,7 @@ struct task_struct {
809 struct sighand_struct *sighand; 809 struct sighand_struct *sighand;
810 810
811 sigset_t blocked, real_blocked; 811 sigset_t blocked, real_blocked;
812 sigset_t saved_sigmask; /* To be restored with TIF_RESTORE_SIGMASK */
812 struct sigpending pending; 813 struct sigpending pending;
813 814
814 unsigned long sas_ss_sp; 815 unsigned long sas_ss_sp;
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index e4086ec8b952..50cab2a09f28 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -246,6 +246,7 @@ struct svc_deferred_req {
246 u32 prot; /* protocol (UDP or TCP) */ 246 u32 prot; /* protocol (UDP or TCP) */
247 struct sockaddr_in addr; 247 struct sockaddr_in addr;
248 struct svc_sock *svsk; /* where reply must go */ 248 struct svc_sock *svsk; /* where reply must go */
249 u32 daddr; /* where reply must come from */
249 struct cache_deferred_req handle; 250 struct cache_deferred_req handle;
250 int argslen; 251 int argslen;
251 u32 args[0]; 252 u32 args[0];
diff --git a/include/linux/swap.h b/include/linux/swap.h
index e92054d6530b..4a99e4a7fbf3 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -167,6 +167,7 @@ extern void FASTCALL(lru_cache_add_active(struct page *));
167extern void FASTCALL(activate_page(struct page *)); 167extern void FASTCALL(activate_page(struct page *));
168extern void FASTCALL(mark_page_accessed(struct page *)); 168extern void FASTCALL(mark_page_accessed(struct page *));
169extern void lru_add_drain(void); 169extern void lru_add_drain(void);
170extern int lru_add_drain_all(void);
170extern int rotate_reclaimable_page(struct page *page); 171extern int rotate_reclaimable_page(struct page *page);
171extern void swap_setup(void); 172extern void swap_setup(void);
172 173
@@ -175,6 +176,17 @@ extern int try_to_free_pages(struct zone **, gfp_t);
175extern int shrink_all_memory(int); 176extern int shrink_all_memory(int);
176extern int vm_swappiness; 177extern int vm_swappiness;
177 178
179#ifdef CONFIG_NUMA
180extern int zone_reclaim_mode;
181extern int zone_reclaim(struct zone *, gfp_t, unsigned int);
182#else
183#define zone_reclaim_mode 0
184static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order)
185{
186 return 0;
187}
188#endif
189
178#ifdef CONFIG_MIGRATION 190#ifdef CONFIG_MIGRATION
179extern int isolate_lru_page(struct page *p); 191extern int isolate_lru_page(struct page *p);
180extern int putback_lru_pages(struct list_head *l); 192extern int putback_lru_pages(struct list_head *l);
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 3eed47347013..e666d6070569 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -510,9 +510,24 @@ asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3,
510asmlinkage long sys_ioprio_set(int which, int who, int ioprio); 510asmlinkage long sys_ioprio_set(int which, int who, int ioprio);
511asmlinkage long sys_ioprio_get(int which, int who); 511asmlinkage long sys_ioprio_get(int which, int who);
512asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask, 512asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask,
513 unsigned long maxnode); 513 unsigned long maxnode);
514asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode, 514asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode,
515 const unsigned long __user *from, const unsigned long __user *to); 515 const unsigned long __user *from,
516 const unsigned long __user *to);
517asmlinkage long sys_mbind(unsigned long start, unsigned long len,
518 unsigned long mode,
519 unsigned long __user *nmask,
520 unsigned long maxnode,
521 unsigned flags);
522asmlinkage long sys_get_mempolicy(int __user *policy,
523 unsigned long __user *nmask,
524 unsigned long maxnode,
525 unsigned long addr, unsigned long flags);
526
527asmlinkage long sys_inotify_init(void);
528asmlinkage long sys_inotify_add_watch(int fd, const char __user *path,
529 u32 mask);
530asmlinkage long sys_inotify_rm_watch(int fd, u32 wd);
516 531
517asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, 532asmlinkage long sys_spu_run(int fd, __u32 __user *unpc,
518 __u32 __user *ustatus); 533 __u32 __user *ustatus);
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 7f472127b7b5..8352a7ce5895 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -182,6 +182,7 @@ enum
182 VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ 182 VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */
183 VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */ 183 VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */
184 VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */ 184 VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */
185 VM_ZONE_RECLAIM_MODE=31,/* reclaim local zone memory before going off node */
185}; 186};
186 187
187 188
diff --git a/include/linux/time.h b/include/linux/time.h
index f2aca7ec6325..614dd8465839 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -74,7 +74,7 @@ extern void do_gettimeofday(struct timeval *tv);
74extern int do_settimeofday(struct timespec *tv); 74extern int do_settimeofday(struct timespec *tv);
75extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); 75extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz);
76#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) 76#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts)
77extern long do_utimes(char __user *filename, struct timeval *times); 77extern long do_utimes(int dfd, char __user *filename, struct timeval *times);
78struct itimerval; 78struct itimerval;
79extern int do_setitimer(int which, struct itimerval *value, 79extern int do_setitimer(int which, struct itimerval *value,
80 struct itimerval *ovalue); 80 struct itimerval *ovalue);
diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h
index a52c8c64a5a3..33a653913d94 100644
--- a/include/linux/tipc_config.h
+++ b/include/linux/tipc_config.h
@@ -168,10 +168,13 @@
168#define TIPC_MAX_LINK_NAME 60 /* format = Z.C.N:interface-Z.C.N:interface */ 168#define TIPC_MAX_LINK_NAME 60 /* format = Z.C.N:interface-Z.C.N:interface */
169 169
170/* 170/*
171 * Link priority limits (range from 0 to # priorities - 1) 171 * Link priority limits (min, default, max, media default)
172 */ 172 */
173 173
174#define TIPC_NUM_LINK_PRI 32 174#define TIPC_MIN_LINK_PRI 0
175#define TIPC_DEF_LINK_PRI 10
176#define TIPC_MAX_LINK_PRI 31
177#define TIPC_MEDIA_LINK_PRI (TIPC_MAX_LINK_PRI + 1)
175 178
176/* 179/*
177 * Link tolerance limits (min, default, max), in ms 180 * Link tolerance limits (min, default, max), in ms
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 315a5163d6a0..e8eb0040ce3a 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -56,6 +56,14 @@
56#define REMOTE_DISTANCE 20 56#define REMOTE_DISTANCE 20
57#define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE) 57#define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE)
58#endif 58#endif
59#ifndef RECLAIM_DISTANCE
60/*
61 * If the distance between nodes in a system is larger than RECLAIM_DISTANCE
62 * (in whatever arch specific measurement units returned by node_distance())
63 * then switch on zone reclaim on boot.
64 */
65#define RECLAIM_DISTANCE 20
66#endif
59#ifndef PENALTY_FOR_NODE_WITH_CPUS 67#ifndef PENALTY_FOR_NODE_WITH_CPUS
60#define PENALTY_FOR_NODE_WITH_CPUS (1) 68#define PENALTY_FOR_NODE_WITH_CPUS (1)
61#endif 69#endif
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index a553f39f6aee..e673b2c984e9 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -175,6 +175,8 @@ void sctp_icmp_frag_needed(struct sock *, struct sctp_association *,
175void sctp_icmp_proto_unreachable(struct sock *sk, 175void sctp_icmp_proto_unreachable(struct sock *sk,
176 struct sctp_association *asoc, 176 struct sctp_association *asoc,
177 struct sctp_transport *t); 177 struct sctp_transport *t);
178void sctp_backlog_migrate(struct sctp_association *assoc,
179 struct sock *oldsk, struct sock *newsk);
178 180
179/* 181/*
180 * Section: Macros, externs, and inlines 182 * Section: Macros, externs, and inlines
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index f5c22d77feab..8c522ae031bb 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -127,9 +127,9 @@ extern struct sctp_globals {
127 * RTO.Alpha - 1/8 (3 when converted to right shifts.) 127 * RTO.Alpha - 1/8 (3 when converted to right shifts.)
128 * RTO.Beta - 1/4 (2 when converted to right shifts.) 128 * RTO.Beta - 1/4 (2 when converted to right shifts.)
129 */ 129 */
130 __u32 rto_initial; 130 unsigned long rto_initial;
131 __u32 rto_min; 131 unsigned long rto_min;
132 __u32 rto_max; 132 unsigned long rto_max;
133 133
134 /* Note: rto_alpha and rto_beta are really defined as inverse 134 /* Note: rto_alpha and rto_beta are really defined as inverse
135 * powers of two to facilitate integer operations. 135 * powers of two to facilitate integer operations.
@@ -140,12 +140,18 @@ extern struct sctp_globals {
140 /* Max.Burst - 4 */ 140 /* Max.Burst - 4 */
141 int max_burst; 141 int max_burst;
142 142
143 /* Valid.Cookie.Life - 60 seconds */
144 int valid_cookie_life;
145
146 /* Whether Cookie Preservative is enabled(1) or not(0) */ 143 /* Whether Cookie Preservative is enabled(1) or not(0) */
147 int cookie_preserve_enable; 144 int cookie_preserve_enable;
148 145
146 /* Valid.Cookie.Life - 60 seconds */
147 unsigned long valid_cookie_life;
148
149 /* Delayed SACK timeout 200ms default*/
150 unsigned long sack_timeout;
151
152 /* HB.interval - 30 seconds */
153 unsigned long hb_interval;
154
149 /* Association.Max.Retrans - 10 attempts 155 /* Association.Max.Retrans - 10 attempts
150 * Path.Max.Retrans - 5 attempts (per destination address) 156 * Path.Max.Retrans - 5 attempts (per destination address)
151 * Max.Init.Retransmits - 8 attempts 157 * Max.Init.Retransmits - 8 attempts
@@ -168,12 +174,6 @@ extern struct sctp_globals {
168 */ 174 */
169 int rcvbuf_policy; 175 int rcvbuf_policy;
170 176
171 /* Delayed SACK timeout 200ms default*/
172 int sack_timeout;
173
174 /* HB.interval - 30 seconds */
175 int hb_interval;
176
177 /* The following variables are implementation specific. */ 177 /* The following variables are implementation specific. */
178 178
179 /* Default initialization values to be applied to new associations. */ 179 /* Default initialization values to be applied to new associations. */
@@ -405,8 +405,9 @@ struct sctp_cookie {
405/* The format of our cookie that we send to our peer. */ 405/* The format of our cookie that we send to our peer. */
406struct sctp_signed_cookie { 406struct sctp_signed_cookie {
407 __u8 signature[SCTP_SECRET_SIZE]; 407 __u8 signature[SCTP_SECRET_SIZE];
408 __u32 __pad; /* force sctp_cookie alignment to 64 bits */
408 struct sctp_cookie c; 409 struct sctp_cookie c;
409}; 410} __attribute__((packed));
410 411
411/* This is another convenience type to allocate memory for address 412/* This is another convenience type to allocate memory for address
412 * params for the maximum size and pass such structures around 413 * params for the maximum size and pass such structures around
@@ -827,7 +828,7 @@ struct sctp_transport {
827 __u32 rtt; /* This is the most recent RTT. */ 828 __u32 rtt; /* This is the most recent RTT. */
828 829
829 /* RTO : The current retransmission timeout value. */ 830 /* RTO : The current retransmission timeout value. */
830 __u32 rto; 831 unsigned long rto;
831 832
832 /* RTTVAR : The current RTT variation. */ 833 /* RTTVAR : The current RTT variation. */
833 __u32 rttvar; 834 __u32 rttvar;
@@ -877,22 +878,10 @@ struct sctp_transport {
877 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 878 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to
878 * the destination address every heartbeat interval. 879 * the destination address every heartbeat interval.
879 */ 880 */
880 __u32 hbinterval; 881 unsigned long hbinterval;
881
882 /* This is the max_retrans value for the transport and will
883 * be initialized from the assocs value. This can be changed
884 * using SCTP_SET_PEER_ADDR_PARAMS socket option.
885 */
886 __u16 pathmaxrxt;
887
888 /* PMTU : The current known path MTU. */
889 __u32 pathmtu;
890 882
891 /* SACK delay timeout */ 883 /* SACK delay timeout */
892 __u32 sackdelay; 884 unsigned long sackdelay;
893
894 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
895 __u32 param_flags;
896 885
897 /* When was the last time (in jiffies) that we heard from this 886 /* When was the last time (in jiffies) that we heard from this
898 * transport? We use this to pick new active and retran paths. 887 * transport? We use this to pick new active and retran paths.
@@ -904,6 +893,18 @@ struct sctp_transport {
904 */ 893 */
905 unsigned long last_time_ecne_reduced; 894 unsigned long last_time_ecne_reduced;
906 895
896 /* This is the max_retrans value for the transport and will
897 * be initialized from the assocs value. This can be changed
898 * using SCTP_SET_PEER_ADDR_PARAMS socket option.
899 */
900 __u16 pathmaxrxt;
901
902 /* PMTU : The current known path MTU. */
903 __u32 pathmtu;
904
905 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
906 __u32 param_flags;
907
907 /* The number of times INIT has been sent on this transport. */ 908 /* The number of times INIT has been sent on this transport. */
908 int init_sent_count; 909 int init_sent_count;
909 910
@@ -1249,6 +1250,14 @@ struct sctp_endpoint {
1249 int last_key; 1250 int last_key;
1250 int key_changed_at; 1251 int key_changed_at;
1251 1252
1253 /* digest: This is a digest of the sctp cookie. This field is
1254 * only used on the receive path when we try to validate
1255 * that the cookie has not been tampered with. We put
1256 * this here so we pre-allocate this once and can re-use
1257 * on every receive.
1258 */
1259 __u8 digest[SCTP_SIGNATURE_SIZE];
1260
1252 /* sendbuf acct. policy. */ 1261 /* sendbuf acct. policy. */
1253 __u32 sndbuf_policy; 1262 __u32 sndbuf_policy;
1254 1263
@@ -1499,9 +1508,9 @@ struct sctp_association {
1499 * These values will be initialized by system defaults, but can 1508 * These values will be initialized by system defaults, but can
1500 * be modified via the SCTP_RTOINFO socket option. 1509 * be modified via the SCTP_RTOINFO socket option.
1501 */ 1510 */
1502 __u32 rto_initial; 1511 unsigned long rto_initial;
1503 __u32 rto_max; 1512 unsigned long rto_max;
1504 __u32 rto_min; 1513 unsigned long rto_min;
1505 1514
1506 /* Maximum number of new data packets that can be sent in a burst. */ 1515 /* Maximum number of new data packets that can be sent in a burst. */
1507 int max_burst; 1516 int max_burst;
@@ -1519,13 +1528,13 @@ struct sctp_association {
1519 __u16 init_retries; 1528 __u16 init_retries;
1520 1529
1521 /* The largest timeout or RTO value to use in attempting an INIT */ 1530 /* The largest timeout or RTO value to use in attempting an INIT */
1522 __u16 max_init_timeo; 1531 unsigned long max_init_timeo;
1523 1532
1524 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 1533 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to
1525 * the destination address every heartbeat interval. This value 1534 * the destination address every heartbeat interval. This value
1526 * will be inherited by all new transports. 1535 * will be inherited by all new transports.
1527 */ 1536 */
1528 __u32 hbinterval; 1537 unsigned long hbinterval;
1529 1538
1530 /* This is the max_retrans value for new transports in the 1539 /* This is the max_retrans value for new transports in the
1531 * association. 1540 * association.
@@ -1537,13 +1546,14 @@ struct sctp_association {
1537 */ 1546 */
1538 __u32 pathmtu; 1547 __u32 pathmtu;
1539 1548
1540 /* SACK delay timeout */
1541 __u32 sackdelay;
1542
1543 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ 1549 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
1544 __u32 param_flags; 1550 __u32 param_flags;
1545 1551
1546 int timeouts[SCTP_NUM_TIMEOUT_TYPES]; 1552 /* SACK delay timeout */
1553 unsigned long sackdelay;
1554
1555
1556 unsigned long timeouts[SCTP_NUM_TIMEOUT_TYPES];
1547 struct timer_list timers[SCTP_NUM_TIMEOUT_TYPES]; 1557 struct timer_list timers[SCTP_NUM_TIMEOUT_TYPES];
1548 1558
1549 /* Transport to which SHUTDOWN chunk was last sent. */ 1559 /* Transport to which SHUTDOWN chunk was last sent. */
@@ -1648,7 +1658,10 @@ struct sctp_association {
1648 /* How many duplicated TSNs have we seen? */ 1658 /* How many duplicated TSNs have we seen? */
1649 int numduptsns; 1659 int numduptsns;
1650 1660
1651 /* Number of seconds of idle time before an association is closed. */ 1661 /* Number of seconds of idle time before an association is closed.
1662 * In the association context, this is really used as a boolean
1663 * since the real timeout is stored in the timeouts array
1664 */
1652 __u32 autoclose; 1665 __u32 autoclose;
1653 1666
1654 /* These are to support 1667 /* These are to support
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h
index 2b5930ba69ec..fb5a2ffae939 100644
--- a/include/scsi/scsi_transport_spi.h
+++ b/include/scsi/scsi_transport_spi.h
@@ -22,6 +22,7 @@
22 22
23#include <linux/config.h> 23#include <linux/config.h>
24#include <linux/transport_class.h> 24#include <linux/transport_class.h>
25#include <linux/mutex.h>
25 26
26struct scsi_transport_template; 27struct scsi_transport_template;
27struct scsi_target; 28struct scsi_target;