diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-01-09 14:18:33 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-01-09 14:18:33 -0500 |
commit | 0a3a98f6dd4e8f4d928a09302c0d1c56f2192ac3 (patch) | |
tree | 92f55e374a84d06ce8213a4540454760fdecf137 /include | |
parent | 8ef12c9f01afba47c2d33bb939085111ca0d0f7d (diff) | |
parent | 5367f2d67c7d0bf1faae90e6e7b4e2ac3c9b5e0f (diff) |
Merge Linus' tree.
Diffstat (limited to 'include')
142 files changed, 1258 insertions, 1781 deletions
diff --git a/include/asm-alpha/cache.h b/include/asm-alpha/cache.h index e69b29501a5f..e6d4d1695e25 100644 --- a/include/asm-alpha/cache.h +++ b/include/asm-alpha/cache.h | |||
@@ -20,6 +20,5 @@ | |||
20 | 20 | ||
21 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | 21 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) |
22 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | 22 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
23 | #define L1_CACHE_SHIFT_MAX L1_CACHE_SHIFT | ||
24 | 23 | ||
25 | #endif | 24 | #endif |
diff --git a/include/asm-alpha/compiler.h b/include/asm-alpha/compiler.h index 0a4a8b40dfcd..00c6f57ad9a7 100644 --- a/include/asm-alpha/compiler.h +++ b/include/asm-alpha/compiler.h | |||
@@ -98,9 +98,7 @@ | |||
98 | #undef inline | 98 | #undef inline |
99 | #undef __inline__ | 99 | #undef __inline__ |
100 | #undef __inline | 100 | #undef __inline |
101 | #if __GNUC__ == 3 && __GNUC_MINOR__ >= 1 || __GNUC__ > 3 | ||
102 | #undef __always_inline | 101 | #undef __always_inline |
103 | #define __always_inline inline __attribute__((always_inline)) | 102 | #define __always_inline inline __attribute__((always_inline)) |
104 | #endif | ||
105 | 103 | ||
106 | #endif /* __ALPHA_COMPILER_H */ | 104 | #endif /* __ALPHA_COMPILER_H */ |
diff --git a/include/asm-alpha/futex.h b/include/asm-alpha/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-alpha/futex.h +++ b/include/asm-alpha/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-alpha/processor.h b/include/asm-alpha/processor.h index 059780a7d3d7..bb1a7a3abb8b 100644 --- a/include/asm-alpha/processor.h +++ b/include/asm-alpha/processor.h | |||
@@ -77,7 +77,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
77 | #define spin_lock_prefetch(lock) do { } while (0) | 77 | #define spin_lock_prefetch(lock) do { } while (0) |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) | ||
81 | extern inline void prefetch(const void *ptr) | 80 | extern inline void prefetch(const void *ptr) |
82 | { | 81 | { |
83 | __builtin_prefetch(ptr, 0, 3); | 82 | __builtin_prefetch(ptr, 0, 3); |
@@ -95,24 +94,4 @@ extern inline void spin_lock_prefetch(const void *ptr) | |||
95 | } | 94 | } |
96 | #endif | 95 | #endif |
97 | 96 | ||
98 | #else | ||
99 | extern inline void prefetch(const void *ptr) | ||
100 | { | ||
101 | __asm__ ("ldl $31,%0" : : "m"(*(char *)ptr)); | ||
102 | } | ||
103 | |||
104 | extern inline void prefetchw(const void *ptr) | ||
105 | { | ||
106 | __asm__ ("ldq $31,%0" : : "m"(*(char *)ptr)); | ||
107 | } | ||
108 | |||
109 | #ifdef CONFIG_SMP | ||
110 | extern inline void spin_lock_prefetch(const void *ptr) | ||
111 | { | ||
112 | __asm__ ("ldq $31,%0" : : "m"(*(char *)ptr)); | ||
113 | } | ||
114 | #endif | ||
115 | |||
116 | #endif /* GCC 3.1 */ | ||
117 | |||
118 | #endif /* __ASM_ALPHA_PROCESSOR_H */ | 97 | #endif /* __ASM_ALPHA_PROCESSOR_H */ |
diff --git a/include/asm-arm/cache.h b/include/asm-arm/cache.h index 8d161f7c87ff..31332c8ac04e 100644 --- a/include/asm-arm/cache.h +++ b/include/asm-arm/cache.h | |||
@@ -7,9 +7,4 @@ | |||
7 | #define L1_CACHE_SHIFT 5 | 7 | #define L1_CACHE_SHIFT 5 |
8 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 8 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
9 | 9 | ||
10 | /* | ||
11 | * largest L1 which this arch supports | ||
12 | */ | ||
13 | #define L1_CACHE_SHIFT_MAX 5 | ||
14 | |||
15 | #endif | 10 | #endif |
diff --git a/include/asm-arm/futex.h b/include/asm-arm/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-arm/futex.h +++ b/include/asm-arm/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h index 59975ee43cf1..7772432d3fd7 100644 --- a/include/asm-arm/irq.h +++ b/include/asm-arm/irq.h | |||
@@ -25,10 +25,14 @@ extern void disable_irq_nosync(unsigned int); | |||
25 | extern void disable_irq(unsigned int); | 25 | extern void disable_irq(unsigned int); |
26 | extern void enable_irq(unsigned int); | 26 | extern void enable_irq(unsigned int); |
27 | 27 | ||
28 | #define __IRQT_FALEDGE (1 << 0) | 28 | /* |
29 | #define __IRQT_RISEDGE (1 << 1) | 29 | * These correspond with the SA_TRIGGER_* defines, and therefore the |
30 | #define __IRQT_LOWLVL (1 << 2) | 30 | * IRQRESOURCE_IRQ_* defines. |
31 | #define __IRQT_HIGHLVL (1 << 3) | 31 | */ |
32 | #define __IRQT_RISEDGE (1 << 0) | ||
33 | #define __IRQT_FALEDGE (1 << 1) | ||
34 | #define __IRQT_HIGHLVL (1 << 2) | ||
35 | #define __IRQT_LOWLVL (1 << 3) | ||
32 | 36 | ||
33 | #define IRQT_NOEDGE (0) | 37 | #define IRQT_NOEDGE (0) |
34 | #define IRQT_RISING (__IRQT_RISEDGE) | 38 | #define IRQT_RISING (__IRQT_RISEDGE) |
diff --git a/include/asm-arm26/futex.h b/include/asm-arm26/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-arm26/futex.h +++ b/include/asm-arm26/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-cris/arch-v10/cache.h b/include/asm-cris/arch-v10/cache.h index 1d1d1ba65b1a..aea27184d2d2 100644 --- a/include/asm-cris/arch-v10/cache.h +++ b/include/asm-cris/arch-v10/cache.h | |||
@@ -4,6 +4,5 @@ | |||
4 | /* Etrax 100LX have 32-byte cache-lines. */ | 4 | /* Etrax 100LX have 32-byte cache-lines. */ |
5 | #define L1_CACHE_BYTES 32 | 5 | #define L1_CACHE_BYTES 32 |
6 | #define L1_CACHE_SHIFT 5 | 6 | #define L1_CACHE_SHIFT 5 |
7 | #define L1_CACHE_SHIFT_MAX 5 | ||
8 | 7 | ||
9 | #endif /* _ASM_ARCH_CACHE_H */ | 8 | #endif /* _ASM_ARCH_CACHE_H */ |
diff --git a/include/asm-cris/arch-v32/cache.h b/include/asm-cris/arch-v32/cache.h index 4fed8d62ccc8..80b236b15319 100644 --- a/include/asm-cris/arch-v32/cache.h +++ b/include/asm-cris/arch-v32/cache.h | |||
@@ -4,6 +4,5 @@ | |||
4 | /* A cache-line is 32 bytes. */ | 4 | /* A cache-line is 32 bytes. */ |
5 | #define L1_CACHE_BYTES 32 | 5 | #define L1_CACHE_BYTES 32 |
6 | #define L1_CACHE_SHIFT 5 | 6 | #define L1_CACHE_SHIFT 5 |
7 | #define L1_CACHE_SHIFT_MAX 5 | ||
8 | 7 | ||
9 | #endif /* _ASM_CRIS_ARCH_CACHE_H */ | 8 | #endif /* _ASM_CRIS_ARCH_CACHE_H */ |
diff --git a/include/asm-cris/dma-mapping.h b/include/asm-cris/dma-mapping.h index 8eff51349ae7..cbf1a98f0129 100644 --- a/include/asm-cris/dma-mapping.h +++ b/include/asm-cris/dma-mapping.h | |||
@@ -153,7 +153,7 @@ dma_set_mask(struct device *dev, u64 mask) | |||
153 | static inline int | 153 | static inline int |
154 | dma_get_cache_alignment(void) | 154 | dma_get_cache_alignment(void) |
155 | { | 155 | { |
156 | return (1 << L1_CACHE_SHIFT_MAX); | 156 | return (1 << INTERNODE_CACHE_SHIFT); |
157 | } | 157 | } |
158 | 158 | ||
159 | #define dma_is_consistent(d) (1) | 159 | #define dma_is_consistent(d) (1) |
diff --git a/include/asm-cris/futex.h b/include/asm-cris/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-cris/futex.h +++ b/include/asm-cris/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h index 3f54fea2b051..9c9e9499cfd8 100644 --- a/include/asm-frv/atomic.h +++ b/include/asm-frv/atomic.h | |||
@@ -218,51 +218,12 @@ extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig | |||
218 | __typeof__(*(ptr)) __xg_orig; \ | 218 | __typeof__(*(ptr)) __xg_orig; \ |
219 | \ | 219 | \ |
220 | switch (sizeof(__xg_orig)) { \ | 220 | switch (sizeof(__xg_orig)) { \ |
221 | case 1: \ | ||
222 | asm volatile( \ | ||
223 | "0: \n" \ | ||
224 | " orcc gr0,gr0,gr0,icc3 \n" \ | ||
225 | " ckeq icc3,cc7 \n" \ | ||
226 | " ldub.p %M0,%1 \n" \ | ||
227 | " orcr cc7,cc7,cc3 \n" \ | ||
228 | " cstb.p %2,%M0 ,cc3,#1 \n" \ | ||
229 | " corcc gr29,gr29,gr0 ,cc3,#1 \n" \ | ||
230 | " beq icc3,#0,0b \n" \ | ||
231 | : "+U"(*__xg_ptr), "=&r"(__xg_orig) \ | ||
232 | : "r"(x) \ | ||
233 | : "memory", "cc7", "cc3", "icc3" \ | ||
234 | ); \ | ||
235 | break; \ | ||
236 | \ | ||
237 | case 2: \ | ||
238 | asm volatile( \ | ||
239 | "0: \n" \ | ||
240 | " orcc gr0,gr0,gr0,icc3 \n" \ | ||
241 | " ckeq icc3,cc7 \n" \ | ||
242 | " lduh.p %M0,%1 \n" \ | ||
243 | " orcr cc7,cc7,cc3 \n" \ | ||
244 | " csth.p %2,%M0 ,cc3,#1 \n" \ | ||
245 | " corcc gr29,gr29,gr0 ,cc3,#1 \n" \ | ||
246 | " beq icc3,#0,0b \n" \ | ||
247 | : "+U"(*__xg_ptr), "=&r"(__xg_orig) \ | ||
248 | : "r"(x) \ | ||
249 | : "memory", "cc7", "cc3", "icc3" \ | ||
250 | ); \ | ||
251 | break; \ | ||
252 | \ | ||
253 | case 4: \ | 221 | case 4: \ |
254 | asm volatile( \ | 222 | asm volatile( \ |
255 | "0: \n" \ | 223 | "swap%I0 %2,%M0" \ |
256 | " orcc gr0,gr0,gr0,icc3 \n" \ | 224 | : "+m"(*__xg_ptr), "=&r"(__xg_orig) \ |
257 | " ckeq icc3,cc7 \n" \ | ||
258 | " ld.p %M0,%1 \n" \ | ||
259 | " orcr cc7,cc7,cc3 \n" \ | ||
260 | " cst.p %2,%M0 ,cc3,#1 \n" \ | ||
261 | " corcc gr29,gr29,gr0 ,cc3,#1 \n" \ | ||
262 | " beq icc3,#0,0b \n" \ | ||
263 | : "+U"(*__xg_ptr), "=&r"(__xg_orig) \ | ||
264 | : "r"(x) \ | 225 | : "r"(x) \ |
265 | : "memory", "cc7", "cc3", "icc3" \ | 226 | : "memory" \ |
266 | ); \ | 227 | ); \ |
267 | break; \ | 228 | break; \ |
268 | \ | 229 | \ |
@@ -277,8 +238,6 @@ extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig | |||
277 | 238 | ||
278 | #else | 239 | #else |
279 | 240 | ||
280 | extern uint8_t __xchg_8 (uint8_t i, volatile void *v); | ||
281 | extern uint16_t __xchg_16(uint16_t i, volatile void *v); | ||
282 | extern uint32_t __xchg_32(uint32_t i, volatile void *v); | 241 | extern uint32_t __xchg_32(uint32_t i, volatile void *v); |
283 | 242 | ||
284 | #define xchg(ptr, x) \ | 243 | #define xchg(ptr, x) \ |
@@ -287,8 +246,6 @@ extern uint32_t __xchg_32(uint32_t i, volatile void *v); | |||
287 | __typeof__(*(ptr)) __xg_orig; \ | 246 | __typeof__(*(ptr)) __xg_orig; \ |
288 | \ | 247 | \ |
289 | switch (sizeof(__xg_orig)) { \ | 248 | switch (sizeof(__xg_orig)) { \ |
290 | case 1: __xg_orig = (__typeof__(*(ptr))) __xchg_8 ((uint8_t) x, __xg_ptr); break; \ | ||
291 | case 2: __xg_orig = (__typeof__(*(ptr))) __xchg_16((uint16_t) x, __xg_ptr); break; \ | ||
292 | case 4: __xg_orig = (__typeof__(*(ptr))) __xchg_32((uint32_t) x, __xg_ptr); break; \ | 249 | case 4: __xg_orig = (__typeof__(*(ptr))) __xchg_32((uint32_t) x, __xg_ptr); break; \ |
293 | default: \ | 250 | default: \ |
294 | __xg_orig = 0; \ | 251 | __xg_orig = 0; \ |
@@ -318,46 +275,6 @@ extern uint32_t __xchg_32(uint32_t i, volatile void *v); | |||
318 | __typeof__(*(ptr)) __xg_new = (new); \ | 275 | __typeof__(*(ptr)) __xg_new = (new); \ |
319 | \ | 276 | \ |
320 | switch (sizeof(__xg_orig)) { \ | 277 | switch (sizeof(__xg_orig)) { \ |
321 | case 1: \ | ||
322 | asm volatile( \ | ||
323 | "0: \n" \ | ||
324 | " orcc gr0,gr0,gr0,icc3 \n" \ | ||
325 | " ckeq icc3,cc7 \n" \ | ||
326 | " ldub.p %M0,%1 \n" \ | ||
327 | " orcr cc7,cc7,cc3 \n" \ | ||
328 | " sub%I4 %1,%4,%2 \n" \ | ||
329 | " sllcc %2,#24,gr0,icc0 \n" \ | ||
330 | " bne icc0,#0,1f \n" \ | ||
331 | " cstb.p %3,%M0 ,cc3,#1 \n" \ | ||
332 | " corcc gr29,gr29,gr0 ,cc3,#1 \n" \ | ||
333 | " beq icc3,#0,0b \n" \ | ||
334 | "1: \n" \ | ||
335 | : "+U"(*__xg_ptr), "=&r"(__xg_orig), "=&r"(__xg_tmp) \ | ||
336 | : "r"(__xg_new), "NPr"(__xg_test) \ | ||
337 | : "memory", "cc7", "cc3", "icc3", "icc0" \ | ||
338 | ); \ | ||
339 | break; \ | ||
340 | \ | ||
341 | case 2: \ | ||
342 | asm volatile( \ | ||
343 | "0: \n" \ | ||
344 | " orcc gr0,gr0,gr0,icc3 \n" \ | ||
345 | " ckeq icc3,cc7 \n" \ | ||
346 | " lduh.p %M0,%1 \n" \ | ||
347 | " orcr cc7,cc7,cc3 \n" \ | ||
348 | " sub%I4 %1,%4,%2 \n" \ | ||
349 | " sllcc %2,#16,gr0,icc0 \n" \ | ||
350 | " bne icc0,#0,1f \n" \ | ||
351 | " csth.p %3,%M0 ,cc3,#1 \n" \ | ||
352 | " corcc gr29,gr29,gr0 ,cc3,#1 \n" \ | ||
353 | " beq icc3,#0,0b \n" \ | ||
354 | "1: \n" \ | ||
355 | : "+U"(*__xg_ptr), "=&r"(__xg_orig), "=&r"(__xg_tmp) \ | ||
356 | : "r"(__xg_new), "NPr"(__xg_test) \ | ||
357 | : "memory", "cc7", "cc3", "icc3", "icc0" \ | ||
358 | ); \ | ||
359 | break; \ | ||
360 | \ | ||
361 | case 4: \ | 278 | case 4: \ |
362 | asm volatile( \ | 279 | asm volatile( \ |
363 | "0: \n" \ | 280 | "0: \n" \ |
@@ -388,8 +305,6 @@ extern uint32_t __xchg_32(uint32_t i, volatile void *v); | |||
388 | 305 | ||
389 | #else | 306 | #else |
390 | 307 | ||
391 | extern uint8_t __cmpxchg_8 (uint8_t *v, uint8_t test, uint8_t new); | ||
392 | extern uint16_t __cmpxchg_16(uint16_t *v, uint16_t test, uint16_t new); | ||
393 | extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); | 308 | extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); |
394 | 309 | ||
395 | #define cmpxchg(ptr, test, new) \ | 310 | #define cmpxchg(ptr, test, new) \ |
@@ -400,8 +315,6 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); | |||
400 | __typeof__(*(ptr)) __xg_new = (new); \ | 315 | __typeof__(*(ptr)) __xg_new = (new); \ |
401 | \ | 316 | \ |
402 | switch (sizeof(__xg_orig)) { \ | 317 | switch (sizeof(__xg_orig)) { \ |
403 | case 1: __xg_orig = __cmpxchg_8 (__xg_ptr, __xg_test, __xg_new); break; \ | ||
404 | case 2: __xg_orig = __cmpxchg_16(__xg_ptr, __xg_test, __xg_new); break; \ | ||
405 | case 4: __xg_orig = __cmpxchg_32(__xg_ptr, __xg_test, __xg_new); break; \ | 318 | case 4: __xg_orig = __cmpxchg_32(__xg_ptr, __xg_test, __xg_new); break; \ |
406 | default: \ | 319 | default: \ |
407 | __xg_orig = 0; \ | 320 | __xg_orig = 0; \ |
@@ -414,7 +327,7 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); | |||
414 | 327 | ||
415 | #endif | 328 | #endif |
416 | 329 | ||
417 | #define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new)) | 330 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) |
418 | 331 | ||
419 | #define atomic_add_unless(v, a, u) \ | 332 | #define atomic_add_unless(v, a, u) \ |
420 | ({ \ | 333 | ({ \ |
@@ -424,6 +337,7 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); | |||
424 | c = old; \ | 337 | c = old; \ |
425 | c != (u); \ | 338 | c != (u); \ |
426 | }) | 339 | }) |
340 | |||
427 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 341 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
428 | 342 | ||
429 | #include <asm-generic/atomic.h> | 343 | #include <asm-generic/atomic.h> |
diff --git a/include/asm-frv/bug.h b/include/asm-frv/bug.h index 074c0d5770eb..451712cc3060 100644 --- a/include/asm-frv/bug.h +++ b/include/asm-frv/bug.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #define _ASM_BUG_H | 12 | #define _ASM_BUG_H |
13 | 13 | ||
14 | #include <linux/config.h> | 14 | #include <linux/config.h> |
15 | #include <linux/linkage.h> | ||
15 | 16 | ||
16 | #ifdef CONFIG_BUG | 17 | #ifdef CONFIG_BUG |
17 | /* | 18 | /* |
diff --git a/include/asm-frv/dma-mapping.h b/include/asm-frv/dma-mapping.h index 5003e017fd1e..e9fc1d47797e 100644 --- a/include/asm-frv/dma-mapping.h +++ b/include/asm-frv/dma-mapping.h | |||
@@ -23,7 +23,7 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t | |||
23 | * returns, or alternatively stop on the first sg_dma_len(sg) which | 23 | * returns, or alternatively stop on the first sg_dma_len(sg) which |
24 | * is 0. | 24 | * is 0. |
25 | */ | 25 | */ |
26 | #define sg_dma_address(sg) ((unsigned long) (page_to_phys((sg)->page) + (sg)->offset)) | 26 | #define sg_dma_address(sg) ((sg)->dma_address) |
27 | #define sg_dma_len(sg) ((sg)->length) | 27 | #define sg_dma_len(sg) ((sg)->length) |
28 | 28 | ||
29 | /* | 29 | /* |
diff --git a/include/asm-frv/io.h b/include/asm-frv/io.h index 48829f727242..075369b1a34b 100644 --- a/include/asm-frv/io.h +++ b/include/asm-frv/io.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | 19 | ||
20 | #include <linux/config.h> | 20 | #include <linux/config.h> |
21 | #include <linux/types.h> | ||
21 | #include <asm/virtconvert.h> | 22 | #include <asm/virtconvert.h> |
22 | #include <asm/string.h> | 23 | #include <asm/string.h> |
23 | #include <asm/mb-regs.h> | 24 | #include <asm/mb-regs.h> |
@@ -104,6 +105,8 @@ static inline void __insl(unsigned long addr, void *buf, int len, int swap) | |||
104 | __insl_sw(addr, buf, len); | 105 | __insl_sw(addr, buf, len); |
105 | } | 106 | } |
106 | 107 | ||
108 | #define mmiowb() mb() | ||
109 | |||
107 | /* | 110 | /* |
108 | * make the short names macros so specific devices | 111 | * make the short names macros so specific devices |
109 | * can override them as required | 112 | * can override them as required |
@@ -209,6 +212,10 @@ static inline uint32_t readl(const volatile void __iomem *addr) | |||
209 | return ret; | 212 | return ret; |
210 | } | 213 | } |
211 | 214 | ||
215 | #define readb_relaxed readb | ||
216 | #define readw_relaxed readw | ||
217 | #define readl_relaxed readl | ||
218 | |||
212 | static inline void writeb(uint8_t datum, volatile void __iomem *addr) | 219 | static inline void writeb(uint8_t datum, volatile void __iomem *addr) |
213 | { | 220 | { |
214 | __builtin_write8((volatile uint8_t __force *) addr, datum); | 221 | __builtin_write8((volatile uint8_t __force *) addr, datum); |
@@ -268,11 +275,106 @@ static inline void __iomem *ioremap_fullcache(unsigned long physaddr, unsigned l | |||
268 | 275 | ||
269 | extern void iounmap(void __iomem *addr); | 276 | extern void iounmap(void __iomem *addr); |
270 | 277 | ||
278 | static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) | ||
279 | { | ||
280 | return (void __iomem *) port; | ||
281 | } | ||
282 | |||
283 | static inline void ioport_unmap(void __iomem *p) | ||
284 | { | ||
285 | } | ||
286 | |||
271 | static inline void flush_write_buffers(void) | 287 | static inline void flush_write_buffers(void) |
272 | { | 288 | { |
273 | __asm__ __volatile__ ("membar" : : :"memory"); | 289 | __asm__ __volatile__ ("membar" : : :"memory"); |
274 | } | 290 | } |
275 | 291 | ||
292 | /* | ||
293 | * do appropriate I/O accesses for token type | ||
294 | */ | ||
295 | static inline unsigned int ioread8(void __iomem *p) | ||
296 | { | ||
297 | return __builtin_read8(p); | ||
298 | } | ||
299 | |||
300 | static inline unsigned int ioread16(void __iomem *p) | ||
301 | { | ||
302 | uint16_t ret = __builtin_read16(p); | ||
303 | if (__is_PCI_addr(p)) | ||
304 | ret = _swapw(ret); | ||
305 | return ret; | ||
306 | } | ||
307 | |||
308 | static inline unsigned int ioread32(void __iomem *p) | ||
309 | { | ||
310 | uint32_t ret = __builtin_read32(p); | ||
311 | if (__is_PCI_addr(p)) | ||
312 | ret = _swapl(ret); | ||
313 | return ret; | ||
314 | } | ||
315 | |||
316 | static inline void iowrite8(u8 val, void __iomem *p) | ||
317 | { | ||
318 | __builtin_write8(p, val); | ||
319 | if (__is_PCI_MEM(p)) | ||
320 | __flush_PCI_writes(); | ||
321 | } | ||
322 | |||
323 | static inline void iowrite16(u16 val, void __iomem *p) | ||
324 | { | ||
325 | if (__is_PCI_addr(p)) | ||
326 | val = _swapw(val); | ||
327 | __builtin_write16(p, val); | ||
328 | if (__is_PCI_MEM(p)) | ||
329 | __flush_PCI_writes(); | ||
330 | } | ||
331 | |||
332 | static inline void iowrite32(u32 val, void __iomem *p) | ||
333 | { | ||
334 | if (__is_PCI_addr(p)) | ||
335 | val = _swapl(val); | ||
336 | __builtin_write32(p, val); | ||
337 | if (__is_PCI_MEM(p)) | ||
338 | __flush_PCI_writes(); | ||
339 | } | ||
340 | |||
341 | static inline void ioread8_rep(void __iomem *p, void *dst, unsigned long count) | ||
342 | { | ||
343 | io_insb((unsigned long) p, dst, count); | ||
344 | } | ||
345 | |||
346 | static inline void ioread16_rep(void __iomem *p, void *dst, unsigned long count) | ||
347 | { | ||
348 | io_insw((unsigned long) p, dst, count); | ||
349 | } | ||
350 | |||
351 | static inline void ioread32_rep(void __iomem *p, void *dst, unsigned long count) | ||
352 | { | ||
353 | __insl_ns((unsigned long) p, dst, count); | ||
354 | } | ||
355 | |||
356 | static inline void iowrite8_rep(void __iomem *p, const void *src, unsigned long count) | ||
357 | { | ||
358 | io_outsb((unsigned long) p, src, count); | ||
359 | } | ||
360 | |||
361 | static inline void iowrite16_rep(void __iomem *p, const void *src, unsigned long count) | ||
362 | { | ||
363 | io_outsw((unsigned long) p, src, count); | ||
364 | } | ||
365 | |||
366 | static inline void iowrite32_rep(void __iomem *p, const void *src, unsigned long count) | ||
367 | { | ||
368 | __outsl_ns((unsigned long) p, src, count); | ||
369 | } | ||
370 | |||
371 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | ||
372 | struct pci_dev; | ||
373 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | ||
374 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p) | ||
375 | { | ||
376 | } | ||
377 | |||
276 | 378 | ||
277 | /* | 379 | /* |
278 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 380 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
@@ -285,6 +387,27 @@ static inline void flush_write_buffers(void) | |||
285 | */ | 387 | */ |
286 | #define xlate_dev_kmem_ptr(p) p | 388 | #define xlate_dev_kmem_ptr(p) p |
287 | 389 | ||
390 | /* | ||
391 | * Check BIOS signature | ||
392 | */ | ||
393 | static inline int check_signature(volatile void __iomem *io_addr, | ||
394 | const unsigned char *signature, int length) | ||
395 | { | ||
396 | int retval = 0; | ||
397 | |||
398 | do { | ||
399 | if (readb(io_addr) != *signature) | ||
400 | goto out; | ||
401 | io_addr++; | ||
402 | signature++; | ||
403 | length--; | ||
404 | } while (length); | ||
405 | |||
406 | retval = 1; | ||
407 | out: | ||
408 | return retval; | ||
409 | } | ||
410 | |||
288 | #endif /* __KERNEL__ */ | 411 | #endif /* __KERNEL__ */ |
289 | 412 | ||
290 | #endif /* _ASM_IO_H */ | 413 | #endif /* _ASM_IO_H */ |
diff --git a/include/asm-frv/mb-regs.h b/include/asm-frv/mb-regs.h index c8f575fc42fa..93fa732fb0cd 100644 --- a/include/asm-frv/mb-regs.h +++ b/include/asm-frv/mb-regs.h | |||
@@ -68,6 +68,9 @@ do { \ | |||
68 | #define __is_PCI_MEM(addr) \ | 68 | #define __is_PCI_MEM(addr) \ |
69 | ((unsigned long)(addr) - __region_PCI_MEM < 0x08000000UL) | 69 | ((unsigned long)(addr) - __region_PCI_MEM < 0x08000000UL) |
70 | 70 | ||
71 | #define __is_PCI_addr(addr) \ | ||
72 | ((unsigned long)(addr) - __region_PCI_IO < 0x0c000000UL) | ||
73 | |||
71 | #define __get_CLKSW() ({ *(volatile unsigned long *)(__region_CS2 + 0x0130000cUL) & 0xffUL; }) | 74 | #define __get_CLKSW() ({ *(volatile unsigned long *)(__region_CS2 + 0x0130000cUL) & 0xffUL; }) |
72 | #define __get_CLKIN() (__get_CLKSW() * 125U * 100000U / 24U) | 75 | #define __get_CLKIN() (__get_CLKSW() * 125U * 100000U / 24U) |
73 | 76 | ||
@@ -149,6 +152,7 @@ do { \ | |||
149 | 152 | ||
150 | #define __is_PCI_IO(addr) 0 /* no PCI */ | 153 | #define __is_PCI_IO(addr) 0 /* no PCI */ |
151 | #define __is_PCI_MEM(addr) 0 | 154 | #define __is_PCI_MEM(addr) 0 |
155 | #define __is_PCI_addr(addr) 0 | ||
152 | #define __region_PCI_IO 0 | 156 | #define __region_PCI_IO 0 |
153 | #define __region_PCI_MEM 0 | 157 | #define __region_PCI_MEM 0 |
154 | #define __flush_PCI_writes() do { } while(0) | 158 | #define __flush_PCI_writes() do { } while(0) |
diff --git a/include/asm-frv/mc146818rtc.h b/include/asm-frv/mc146818rtc.h new file mode 100644 index 000000000000..90dfb7a633d1 --- /dev/null +++ b/include/asm-frv/mc146818rtc.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* mc146818rtc.h: RTC defs | ||
2 | * | ||
3 | * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_MC146818RTC_H | ||
13 | #define _ASM_MC146818RTC_H | ||
14 | |||
15 | |||
16 | #endif /* _ASM_MC146818RTC_H */ | ||
diff --git a/include/asm-frv/module.h b/include/asm-frv/module.h index 3223cfaef743..3d5c6360289a 100644 --- a/include/asm-frv/module.h +++ b/include/asm-frv/module.h | |||
@@ -11,10 +11,18 @@ | |||
11 | #ifndef _ASM_MODULE_H | 11 | #ifndef _ASM_MODULE_H |
12 | #define _ASM_MODULE_H | 12 | #define _ASM_MODULE_H |
13 | 13 | ||
14 | #define module_map(x) vmalloc(x) | 14 | struct mod_arch_specific |
15 | #define module_unmap(x) vfree(x) | 15 | { |
16 | #define module_arch_init(x) (0) | 16 | }; |
17 | #define arch_init_modules(x) do { } while (0) | 17 | |
18 | #define Elf_Shdr Elf32_Shdr | ||
19 | #define Elf_Sym Elf32_Sym | ||
20 | #define Elf_Ehdr Elf32_Ehdr | ||
21 | |||
22 | /* | ||
23 | * Include the architecture version. | ||
24 | */ | ||
25 | #define MODULE_ARCH_VERMAGIC __stringify(PROCESSOR_MODEL_NAME) " " | ||
18 | 26 | ||
19 | #endif /* _ASM_MODULE_H */ | 27 | #endif /* _ASM_MODULE_H */ |
20 | 28 | ||
diff --git a/include/asm-frv/pci.h b/include/asm-frv/pci.h index 1168451c275f..598b0c6b695d 100644 --- a/include/asm-frv/pci.h +++ b/include/asm-frv/pci.h | |||
@@ -57,6 +57,14 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, | |||
57 | */ | 57 | */ |
58 | #define PCI_DMA_BUS_IS_PHYS (1) | 58 | #define PCI_DMA_BUS_IS_PHYS (1) |
59 | 59 | ||
60 | /* pci_unmap_{page,single} is a nop so... */ | ||
61 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | ||
62 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | ||
63 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) | ||
64 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
65 | #define pci_unmap_len(PTR, LEN_NAME) (0) | ||
66 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
67 | |||
60 | #ifdef CONFIG_PCI | 68 | #ifdef CONFIG_PCI |
61 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 69 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
62 | enum pci_dma_burst_strategy *strat, | 70 | enum pci_dma_burst_strategy *strat, |
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index 844666377dcb..d1c3b182c691 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h | |||
@@ -421,6 +421,11 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
421 | } | 421 | } |
422 | 422 | ||
423 | /* | 423 | /* |
424 | * Macro to mark a page protection value as "uncacheable" | ||
425 | */ | ||
426 | #define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | _PAGE_NOCACHE)) | ||
427 | |||
428 | /* | ||
424 | * Conversion functions: convert a page and protection to a page entry, | 429 | * Conversion functions: convert a page and protection to a page entry, |
425 | * and a page entry and page directory to the page they refer to. | 430 | * and a page entry and page directory to the page they refer to. |
426 | */ | 431 | */ |
diff --git a/include/asm-frv/types.h b/include/asm-frv/types.h index 50605df6d8ac..2560f596a75d 100644 --- a/include/asm-frv/types.h +++ b/include/asm-frv/types.h | |||
@@ -59,7 +59,6 @@ typedef unsigned int u32; | |||
59 | 59 | ||
60 | typedef signed long long s64; | 60 | typedef signed long long s64; |
61 | typedef unsigned long long u64; | 61 | typedef unsigned long long u64; |
62 | typedef u64 u_quad_t; | ||
63 | 62 | ||
64 | /* Dma addresses are 32-bits wide. */ | 63 | /* Dma addresses are 32-bits wide. */ |
65 | 64 | ||
diff --git a/include/asm-frv/uaccess.h b/include/asm-frv/uaccess.h index 991b50fbba24..b6bcbe01f6ee 100644 --- a/include/asm-frv/uaccess.h +++ b/include/asm-frv/uaccess.h | |||
@@ -180,16 +180,16 @@ do { \ | |||
180 | \ | 180 | \ |
181 | switch (sizeof(*(ptr))) { \ | 181 | switch (sizeof(*(ptr))) { \ |
182 | case 1: \ | 182 | case 1: \ |
183 | __get_user_asm(__gu_err, __gu_val, ptr, "ub", "=r"); \ | 183 | __get_user_asm(__gu_err, *(u8*)&__gu_val, ptr, "ub", "=r"); \ |
184 | break; \ | 184 | break; \ |
185 | case 2: \ | 185 | case 2: \ |
186 | __get_user_asm(__gu_err, __gu_val, ptr, "uh", "=r"); \ | 186 | __get_user_asm(__gu_err, *(u16*)&__gu_val, ptr, "uh", "=r"); \ |
187 | break; \ | 187 | break; \ |
188 | case 4: \ | 188 | case 4: \ |
189 | __get_user_asm(__gu_err, __gu_val, ptr, "", "=r"); \ | 189 | __get_user_asm(__gu_err, *(u32*)&__gu_val, ptr, "", "=r"); \ |
190 | break; \ | 190 | break; \ |
191 | case 8: \ | 191 | case 8: \ |
192 | __get_user_asm(__gu_err, __gu_val, ptr, "d", "=e"); \ | 192 | __get_user_asm(__gu_err, *(u64*)&__gu_val, ptr, "d", "=e"); \ |
193 | break; \ | 193 | break; \ |
194 | default: \ | 194 | default: \ |
195 | __gu_err = __get_user_bad(); \ | 195 | __gu_err = __get_user_bad(); \ |
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h index 5cf989b448d5..cde376a7a857 100644 --- a/include/asm-frv/unistd.h +++ b/include/asm-frv/unistd.h | |||
@@ -313,7 +313,7 @@ do { \ | |||
313 | unsigned long __sr2 = (res); \ | 313 | unsigned long __sr2 = (res); \ |
314 | if (__builtin_expect(__sr2 >= (unsigned long)(-4095), 0)) { \ | 314 | if (__builtin_expect(__sr2 >= (unsigned long)(-4095), 0)) { \ |
315 | errno = (-__sr2); \ | 315 | errno = (-__sr2); \ |
316 | __sr2 = ULONG_MAX; \ | 316 | __sr2 = ~0UL; \ |
317 | } \ | 317 | } \ |
318 | return (type) __sr2; \ | 318 | return (type) __sr2; \ |
319 | } while (0) | 319 | } while (0) |
diff --git a/include/asm-frv/vga.h b/include/asm-frv/vga.h new file mode 100644 index 000000000000..a702c800a229 --- /dev/null +++ b/include/asm-frv/vga.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* vga.h: VGA register stuff | ||
2 | * | ||
3 | * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_VGA_H | ||
13 | #define _ASM_VGA_H | ||
14 | |||
15 | |||
16 | |||
17 | #endif /* _ASM_VGA_H */ | ||
diff --git a/include/asm-frv/xor.h b/include/asm-frv/xor.h new file mode 100644 index 000000000000..c82eb12a5b18 --- /dev/null +++ b/include/asm-frv/xor.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/xor.h> | |||
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index e0a28b925ef0..0fada8f16dc6 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
@@ -8,6 +8,7 @@ | |||
8 | * edit all arch specific atomic.h files. | 8 | * edit all arch specific atomic.h files. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/types.h> | ||
11 | 12 | ||
12 | /* | 13 | /* |
13 | * Suppport for atomic_long_t | 14 | * Suppport for atomic_long_t |
diff --git a/include/asm-generic/dma-mapping.h b/include/asm-generic/dma-mapping.h index 747d790295f3..1b356207712c 100644 --- a/include/asm-generic/dma-mapping.h +++ b/include/asm-generic/dma-mapping.h | |||
@@ -274,7 +274,7 @@ dma_get_cache_alignment(void) | |||
274 | { | 274 | { |
275 | /* no easy way to get cache size on all processors, so return | 275 | /* no easy way to get cache size on all processors, so return |
276 | * the maximum possible, to be safe */ | 276 | * the maximum possible, to be safe */ |
277 | return (1 << L1_CACHE_SHIFT_MAX); | 277 | return (1 << INTERNODE_CACHE_SHIFT); |
278 | } | 278 | } |
279 | 279 | ||
280 | static inline void | 280 | static inline void |
diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h new file mode 100644 index 000000000000..3ae2c7347549 --- /dev/null +++ b/include/asm-generic/futex.h | |||
@@ -0,0 +1,53 @@ | |||
1 | #ifndef _ASM_GENERIC_FUTEX_H | ||
2 | #define _ASM_GENERIC_FUTEX_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | ||
diff --git a/include/asm-h8300/futex.h b/include/asm-h8300/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-h8300/futex.h +++ b/include/asm-h8300/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-i386/cache.h b/include/asm-i386/cache.h index 849788710feb..615911e5bd24 100644 --- a/include/asm-i386/cache.h +++ b/include/asm-i386/cache.h | |||
@@ -10,6 +10,4 @@ | |||
10 | #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) | 10 | #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) |
11 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 11 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
12 | 12 | ||
13 | #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */ | ||
14 | |||
15 | #endif | 13 | #endif |
diff --git a/include/asm-i386/dma-mapping.h b/include/asm-i386/dma-mapping.h index e56c335f8ef9..6c37a9ab8d60 100644 --- a/include/asm-i386/dma-mapping.h +++ b/include/asm-i386/dma-mapping.h | |||
@@ -150,7 +150,7 @@ dma_get_cache_alignment(void) | |||
150 | { | 150 | { |
151 | /* no easy way to get cache size on all x86, so return the | 151 | /* no easy way to get cache size on all x86, so return the |
152 | * maximum possible, to be safe */ | 152 | * maximum possible, to be safe */ |
153 | return (1 << L1_CACHE_SHIFT_MAX); | 153 | return (1 << INTERNODE_CACHE_SHIFT); |
154 | } | 154 | } |
155 | 155 | ||
156 | #define dma_is_consistent(d) (1) | 156 | #define dma_is_consistent(d) (1) |
diff --git a/include/asm-i386/irq.h b/include/asm-i386/irq.h index 270f1986b19f..5169d7af456f 100644 --- a/include/asm-i386/irq.h +++ b/include/asm-i386/irq.h | |||
@@ -21,8 +21,6 @@ static __inline__ int irq_canonicalize(int irq) | |||
21 | return ((irq == 2) ? 9 : irq); | 21 | return ((irq == 2) ? 9 : irq); |
22 | } | 22 | } |
23 | 23 | ||
24 | extern void release_vm86_irqs(struct task_struct *); | ||
25 | |||
26 | #ifdef CONFIG_X86_LOCAL_APIC | 24 | #ifdef CONFIG_X86_LOCAL_APIC |
27 | # define ARCH_HAS_NMI_WATCHDOG /* See include/linux/nmi.h */ | 25 | # define ARCH_HAS_NMI_WATCHDOG /* See include/linux/nmi.h */ |
28 | #endif | 26 | #endif |
diff --git a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h index 7e0f2945d17d..f324c53b6f9a 100644 --- a/include/asm-i386/ptrace.h +++ b/include/asm-i386/ptrace.h | |||
@@ -54,6 +54,9 @@ struct pt_regs { | |||
54 | #define PTRACE_GET_THREAD_AREA 25 | 54 | #define PTRACE_GET_THREAD_AREA 25 |
55 | #define PTRACE_SET_THREAD_AREA 26 | 55 | #define PTRACE_SET_THREAD_AREA 26 |
56 | 56 | ||
57 | #define PTRACE_SYSEMU 31 | ||
58 | #define PTRACE_SYSEMU_SINGLESTEP 32 | ||
59 | |||
57 | #ifdef __KERNEL__ | 60 | #ifdef __KERNEL__ |
58 | 61 | ||
59 | #include <asm/vm86.h> | 62 | #include <asm/vm86.h> |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index fe38b9a96233..481c3c0ea720 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -299,8 +299,9 @@ | |||
299 | #define __NR_inotify_init 291 | 299 | #define __NR_inotify_init 291 |
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 | 303 | ||
303 | #define NR_syscalls 294 | 304 | #define NR_syscalls 295 |
304 | 305 | ||
305 | /* | 306 | /* |
306 | * user-visible error numbers are in the range -1 - -128: see | 307 | * user-visible error numbers are in the range -1 - -128: see |
diff --git a/include/asm-i386/vm86.h b/include/asm-i386/vm86.h index 40ec82c6914d..952fd6957380 100644 --- a/include/asm-i386/vm86.h +++ b/include/asm-i386/vm86.h | |||
@@ -16,7 +16,11 @@ | |||
16 | #define IF_MASK 0x00000200 | 16 | #define IF_MASK 0x00000200 |
17 | #define IOPL_MASK 0x00003000 | 17 | #define IOPL_MASK 0x00003000 |
18 | #define NT_MASK 0x00004000 | 18 | #define NT_MASK 0x00004000 |
19 | #ifdef CONFIG_VM86 | ||
19 | #define VM_MASK 0x00020000 | 20 | #define VM_MASK 0x00020000 |
21 | #else | ||
22 | #define VM_MASK 0 /* ignored */ | ||
23 | #endif | ||
20 | #define AC_MASK 0x00040000 | 24 | #define AC_MASK 0x00040000 |
21 | #define VIF_MASK 0x00080000 /* virtual interrupt flag */ | 25 | #define VIF_MASK 0x00080000 /* virtual interrupt flag */ |
22 | #define VIP_MASK 0x00100000 /* virtual interrupt pending */ | 26 | #define VIP_MASK 0x00100000 /* virtual interrupt pending */ |
@@ -200,9 +204,25 @@ struct kernel_vm86_struct { | |||
200 | */ | 204 | */ |
201 | }; | 205 | }; |
202 | 206 | ||
207 | #ifdef CONFIG_VM86 | ||
208 | |||
203 | void handle_vm86_fault(struct kernel_vm86_regs *, long); | 209 | void handle_vm86_fault(struct kernel_vm86_regs *, long); |
204 | int handle_vm86_trap(struct kernel_vm86_regs *, long, int); | 210 | int handle_vm86_trap(struct kernel_vm86_regs *, long, int); |
205 | 211 | ||
212 | struct task_struct; | ||
213 | void release_vm86_irqs(struct task_struct *); | ||
214 | |||
215 | #else | ||
216 | |||
217 | #define handle_vm86_fault(a, b) | ||
218 | #define release_vm86_irqs(a) | ||
219 | |||
220 | static inline int handle_vm86_trap(struct kernel_vm86_regs *a, long b, int c) { | ||
221 | return 0; | ||
222 | } | ||
223 | |||
224 | #endif /* CONFIG_VM86 */ | ||
225 | |||
206 | #endif /* __KERNEL__ */ | 226 | #endif /* __KERNEL__ */ |
207 | 227 | ||
208 | #endif | 228 | #endif |
diff --git a/include/asm-ia64/bug.h b/include/asm-ia64/bug.h index 3aa0a0a5474b..823616b5020b 100644 --- a/include/asm-ia64/bug.h +++ b/include/asm-ia64/bug.h | |||
@@ -2,11 +2,7 @@ | |||
2 | #define _ASM_IA64_BUG_H | 2 | #define _ASM_IA64_BUG_H |
3 | 3 | ||
4 | #ifdef CONFIG_BUG | 4 | #ifdef CONFIG_BUG |
5 | #if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) | 5 | #define ia64_abort() __builtin_trap() |
6 | # define ia64_abort() __builtin_trap() | ||
7 | #else | ||
8 | # define ia64_abort() (*(volatile int *) 0 = 0) | ||
9 | #endif | ||
10 | #define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); ia64_abort(); } while (0) | 6 | #define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); ia64_abort(); } while (0) |
11 | 7 | ||
12 | /* should this BUG be made generic? */ | 8 | /* should this BUG be made generic? */ |
diff --git a/include/asm-ia64/cache.h b/include/asm-ia64/cache.h index 666d8f175cb3..40dd25195d65 100644 --- a/include/asm-ia64/cache.h +++ b/include/asm-ia64/cache.h | |||
@@ -12,8 +12,6 @@ | |||
12 | #define L1_CACHE_SHIFT CONFIG_IA64_L1_CACHE_SHIFT | 12 | #define L1_CACHE_SHIFT CONFIG_IA64_L1_CACHE_SHIFT |
13 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 13 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
14 | 14 | ||
15 | #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */ | ||
16 | |||
17 | #ifdef CONFIG_SMP | 15 | #ifdef CONFIG_SMP |
18 | # define SMP_CACHE_SHIFT L1_CACHE_SHIFT | 16 | # define SMP_CACHE_SHIFT L1_CACHE_SHIFT |
19 | # define SMP_CACHE_BYTES L1_CACHE_BYTES | 17 | # define SMP_CACHE_BYTES L1_CACHE_BYTES |
diff --git a/include/asm-ia64/futex.h b/include/asm-ia64/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-ia64/futex.h +++ b/include/asm-ia64/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h index cf772a67f858..b64fdb985494 100644 --- a/include/asm-ia64/io.h +++ b/include/asm-ia64/io.h | |||
@@ -89,6 +89,7 @@ phys_to_virt (unsigned long address) | |||
89 | 89 | ||
90 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE | 90 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE |
91 | extern int valid_phys_addr_range (unsigned long addr, size_t *count); /* efi.c */ | 91 | extern int valid_phys_addr_range (unsigned long addr, size_t *count); /* efi.c */ |
92 | extern int valid_mmap_phys_addr_range (unsigned long addr, size_t *count); | ||
92 | 93 | ||
93 | /* | 94 | /* |
94 | * The following two macros are deprecated and scheduled for removal. | 95 | * The following two macros are deprecated and scheduled for removal. |
diff --git a/include/asm-ia64/spinlock.h b/include/asm-ia64/spinlock.h index 0c91a76c5ea3..9e83210dc312 100644 --- a/include/asm-ia64/spinlock.h +++ b/include/asm-ia64/spinlock.h | |||
@@ -34,7 +34,7 @@ __raw_spin_lock_flags (raw_spinlock_t *lock, unsigned long flags) | |||
34 | { | 34 | { |
35 | register volatile unsigned int *ptr asm ("r31") = &lock->lock; | 35 | register volatile unsigned int *ptr asm ("r31") = &lock->lock; |
36 | 36 | ||
37 | #if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3) | 37 | #if (__GNUC__ == 3 && __GNUC_MINOR__ < 3) |
38 | # ifdef CONFIG_ITANIUM | 38 | # ifdef CONFIG_ITANIUM |
39 | /* don't use brl on Itanium... */ | 39 | /* don't use brl on Itanium... */ |
40 | asm volatile ("{\n\t" | 40 | asm volatile ("{\n\t" |
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index 2bf543493cb8..962f9bd1bdff 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h | |||
@@ -269,12 +269,13 @@ | |||
269 | #define __NR_inotify_init 1277 | 269 | #define __NR_inotify_init 1277 |
270 | #define __NR_inotify_add_watch 1278 | 270 | #define __NR_inotify_add_watch 1278 |
271 | #define __NR_inotify_rm_watch 1279 | 271 | #define __NR_inotify_rm_watch 1279 |
272 | #define __NR_migrate_pages 1280 | ||
272 | 273 | ||
273 | #ifdef __KERNEL__ | 274 | #ifdef __KERNEL__ |
274 | 275 | ||
275 | #include <linux/config.h> | 276 | #include <linux/config.h> |
276 | 277 | ||
277 | #define NR_syscalls 256 /* length of syscall table */ | 278 | #define NR_syscalls 270 /* length of syscall table */ |
278 | 279 | ||
279 | #define __ARCH_WANT_SYS_RT_SIGACTION | 280 | #define __ARCH_WANT_SYS_RT_SIGACTION |
280 | 281 | ||
diff --git a/include/asm-m32r/cache.h b/include/asm-m32r/cache.h index 724820596980..9c2b2d9998bc 100644 --- a/include/asm-m32r/cache.h +++ b/include/asm-m32r/cache.h | |||
@@ -7,6 +7,4 @@ | |||
7 | #define L1_CACHE_SHIFT 4 | 7 | #define L1_CACHE_SHIFT 4 |
8 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 8 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
9 | 9 | ||
10 | #define L1_CACHE_SHIFT_MAX 4 | ||
11 | |||
12 | #endif /* _ASM_M32R_CACHE_H */ | 10 | #endif /* _ASM_M32R_CACHE_H */ |
diff --git a/include/asm-m32r/futex.h b/include/asm-m32r/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-m32r/futex.h +++ b/include/asm-m32r/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-m68k/cache.h b/include/asm-m68k/cache.h index 6161fd3d8600..fed3fd30de7e 100644 --- a/include/asm-m68k/cache.h +++ b/include/asm-m68k/cache.h | |||
@@ -8,6 +8,4 @@ | |||
8 | #define L1_CACHE_SHIFT 4 | 8 | #define L1_CACHE_SHIFT 4 |
9 | #define L1_CACHE_BYTES (1<< L1_CACHE_SHIFT) | 9 | #define L1_CACHE_BYTES (1<< L1_CACHE_SHIFT) |
10 | 10 | ||
11 | #define L1_CACHE_SHIFT_MAX 4 /* largest L1 which this arch supports */ | ||
12 | |||
13 | #endif | 11 | #endif |
diff --git a/include/asm-m68k/futex.h b/include/asm-m68k/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-m68k/futex.h +++ b/include/asm-m68k/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-m68knommu/futex.h b/include/asm-m68knommu/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-m68knommu/futex.h +++ b/include/asm-m68knommu/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-mips/cache.h b/include/asm-mips/cache.h index 1a5d1a669db3..55e19f2ff0e0 100644 --- a/include/asm-mips/cache.h +++ b/include/asm-mips/cache.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #define L1_CACHE_SHIFT CONFIG_MIPS_L1_CACHE_SHIFT | 15 | #define L1_CACHE_SHIFT CONFIG_MIPS_L1_CACHE_SHIFT |
16 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 16 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
17 | 17 | ||
18 | #define L1_CACHE_SHIFT_MAX 6 | ||
19 | #define SMP_CACHE_SHIFT L1_CACHE_SHIFT | 18 | #define SMP_CACHE_SHIFT L1_CACHE_SHIFT |
20 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | 19 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
21 | 20 | ||
diff --git a/include/asm-parisc/cache.h b/include/asm-parisc/cache.h index 5da72e38bdde..38d201b5652d 100644 --- a/include/asm-parisc/cache.h +++ b/include/asm-parisc/cache.h | |||
@@ -28,7 +28,6 @@ | |||
28 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | 28 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) |
29 | 29 | ||
30 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | 30 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
31 | #define L1_CACHE_SHIFT_MAX 5 /* largest L1 which this arch supports */ | ||
32 | 31 | ||
33 | extern void flush_data_cache_local(void); /* flushes local data-cache only */ | 32 | extern void flush_data_cache_local(void); /* flushes local data-cache only */ |
34 | extern void flush_instruction_cache_local(void); /* flushes local code-cache only */ | 33 | extern void flush_instruction_cache_local(void); /* flushes local code-cache only */ |
diff --git a/include/asm-parisc/futex.h b/include/asm-parisc/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-parisc/futex.h +++ b/include/asm-parisc/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-powerpc/cache.h b/include/asm-powerpc/cache.h index 26ce502e76e8..6379c2df5c40 100644 --- a/include/asm-powerpc/cache.h +++ b/include/asm-powerpc/cache.h | |||
@@ -19,7 +19,6 @@ | |||
19 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 19 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
20 | 20 | ||
21 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | 21 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
22 | #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */ | ||
23 | 22 | ||
24 | #if defined(__powerpc64__) && !defined(__ASSEMBLY__) | 23 | #if defined(__powerpc64__) && !defined(__ASSEMBLY__) |
25 | struct ppc64_caches { | 24 | struct ppc64_caches { |
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index 59a80163f75f..a96e5742ca32 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h | |||
@@ -229,7 +229,7 @@ static inline int dma_get_cache_alignment(void) | |||
229 | #ifdef CONFIG_PPC64 | 229 | #ifdef CONFIG_PPC64 |
230 | /* no easy way to get cache size on all processors, so return | 230 | /* no easy way to get cache size on all processors, so return |
231 | * the maximum possible, to be safe */ | 231 | * the maximum possible, to be safe */ |
232 | return (1 << L1_CACHE_SHIFT_MAX); | 232 | return (1 << INTERNODE_CACHE_SHIFT); |
233 | #else | 233 | #else |
234 | /* | 234 | /* |
235 | * Each processor family will define its own L1_CACHE_SHIFT, | 235 | * Each processor family will define its own L1_CACHE_SHIFT, |
diff --git a/include/asm-s390/cache.h b/include/asm-s390/cache.h index 29845378b206..e20cdd9074db 100644 --- a/include/asm-s390/cache.h +++ b/include/asm-s390/cache.h | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #define L1_CACHE_BYTES 256 | 14 | #define L1_CACHE_BYTES 256 |
15 | #define L1_CACHE_SHIFT 8 | 15 | #define L1_CACHE_SHIFT 8 |
16 | #define L1_CACHE_SHIFT_MAX 8 /* largest L1 which this arch supports */ | ||
17 | 16 | ||
18 | #define ARCH_KMALLOC_MINALIGN 8 | 17 | #define ARCH_KMALLOC_MINALIGN 8 |
19 | 18 | ||
diff --git a/include/asm-s390/futex.h b/include/asm-s390/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-s390/futex.h +++ b/include/asm-s390/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h index 9b4dd6d8212e..656fdfe9e8b4 100644 --- a/include/asm-sh/cache.h +++ b/include/asm-sh/cache.h | |||
@@ -22,8 +22,6 @@ | |||
22 | 22 | ||
23 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | 23 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) |
24 | 24 | ||
25 | #define L1_CACHE_SHIFT_MAX 5 /* largest L1 which this arch supports */ | ||
26 | |||
27 | struct cache_info { | 25 | struct cache_info { |
28 | unsigned int ways; | 26 | unsigned int ways; |
29 | unsigned int sets; | 27 | unsigned int sets; |
diff --git a/include/asm-sh/futex.h b/include/asm-sh/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-sh/futex.h +++ b/include/asm-sh/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-sh64/cache.h b/include/asm-sh64/cache.h index f54e85e8a470..a4f36f0036e1 100644 --- a/include/asm-sh64/cache.h +++ b/include/asm-sh64/cache.h | |||
@@ -20,8 +20,6 @@ | |||
20 | #define L1_CACHE_ALIGN_MASK (~(L1_CACHE_BYTES - 1)) | 20 | #define L1_CACHE_ALIGN_MASK (~(L1_CACHE_BYTES - 1)) |
21 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES - 1)) & L1_CACHE_ALIGN_MASK) | 21 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES - 1)) & L1_CACHE_ALIGN_MASK) |
22 | #define L1_CACHE_SIZE_BYTES (L1_CACHE_BYTES << 10) | 22 | #define L1_CACHE_SIZE_BYTES (L1_CACHE_BYTES << 10) |
23 | /* Largest L1 which this arch supports */ | ||
24 | #define L1_CACHE_SHIFT_MAX 5 | ||
25 | 23 | ||
26 | #ifdef MODULE | 24 | #ifdef MODULE |
27 | #define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES))) | 25 | #define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES))) |
diff --git a/include/asm-sh64/futex.h b/include/asm-sh64/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-sh64/futex.h +++ b/include/asm-sh64/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-sparc/cache.h b/include/asm-sparc/cache.h index a10522cb21b7..cb971e88aea4 100644 --- a/include/asm-sparc/cache.h +++ b/include/asm-sparc/cache.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #define L1_CACHE_SHIFT 5 | 13 | #define L1_CACHE_SHIFT 5 |
14 | #define L1_CACHE_BYTES 32 | 14 | #define L1_CACHE_BYTES 32 |
15 | #define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))) | 15 | #define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))) |
16 | #define L1_CACHE_SHIFT_MAX 5 /* largest L1 which this arch supports */ | ||
17 | 16 | ||
18 | #define SMP_CACHE_BYTES 32 | 17 | #define SMP_CACHE_BYTES 32 |
19 | 18 | ||
diff --git a/include/asm-sparc/futex.h b/include/asm-sparc/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-sparc/futex.h +++ b/include/asm-sparc/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-sparc64/cache.h b/include/asm-sparc64/cache.h index ade5ec3bfd5a..f7d35a2ae9b8 100644 --- a/include/asm-sparc64/cache.h +++ b/include/asm-sparc64/cache.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #define L1_CACHE_BYTES 32 /* Two 16-byte sub-blocks per line. */ | 9 | #define L1_CACHE_BYTES 32 /* Two 16-byte sub-blocks per line. */ |
10 | 10 | ||
11 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | 11 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) |
12 | #define L1_CACHE_SHIFT_MAX 5 /* largest L1 which this arch supports */ | ||
13 | 12 | ||
14 | #define SMP_CACHE_BYTES_SHIFT 6 | 13 | #define SMP_CACHE_BYTES_SHIFT 6 |
15 | #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) /* L2 cache line size. */ | 14 | #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) /* L2 cache line size. */ |
diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-sparc64/futex.h +++ b/include/asm-sparc64/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h index b5417529f6f1..309f1466b6fa 100644 --- a/include/asm-sparc64/system.h +++ b/include/asm-sparc64/system.h | |||
@@ -193,11 +193,7 @@ do { \ | |||
193 | * not preserve it's value. Hairy, but it lets us remove 2 loads | 193 | * not preserve it's value. Hairy, but it lets us remove 2 loads |
194 | * and 2 stores in this critical code path. -DaveM | 194 | * and 2 stores in this critical code path. -DaveM |
195 | */ | 195 | */ |
196 | #if __GNUC__ >= 3 | ||
197 | #define EXTRA_CLOBBER ,"%l1" | 196 | #define EXTRA_CLOBBER ,"%l1" |
198 | #else | ||
199 | #define EXTRA_CLOBBER | ||
200 | #endif | ||
201 | #define switch_to(prev, next, last) \ | 197 | #define switch_to(prev, next, last) \ |
202 | do { if (test_thread_flag(TIF_PERFCTR)) { \ | 198 | do { if (test_thread_flag(TIF_PERFCTR)) { \ |
203 | unsigned long __tmp; \ | 199 | unsigned long __tmp; \ |
diff --git a/include/asm-um/cache.h b/include/asm-um/cache.h index a10602a5b2d6..3d0587075521 100644 --- a/include/asm-um/cache.h +++ b/include/asm-um/cache.h | |||
@@ -13,9 +13,6 @@ | |||
13 | # define L1_CACHE_SHIFT 5 | 13 | # define L1_CACHE_SHIFT 5 |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | /* XXX: this is valid for x86 and x86_64. */ | ||
17 | #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */ | ||
18 | |||
19 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 16 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
20 | 17 | ||
21 | #endif | 18 | #endif |
diff --git a/include/asm-um/futex.h b/include/asm-um/futex.h index 142ee2d8e0fd..6a332a9f099c 100644 --- a/include/asm-um/futex.h +++ b/include/asm-um/futex.h | |||
@@ -1,12 +1,6 @@ | |||
1 | #ifndef __UM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define __UM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #include <linux/futex.h> | 4 | #include <asm-generic/futex.h> |
5 | #include <asm/errno.h> | ||
6 | #include <asm/system.h> | ||
7 | #include <asm/processor.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | #include "asm/arch/futex.h" | ||
11 | 5 | ||
12 | #endif | 6 | #endif |
diff --git a/include/asm-um/rwsem.h b/include/asm-um/rwsem.h index 661c0e54702b..b5fc449dc86b 100644 --- a/include/asm-um/rwsem.h +++ b/include/asm-um/rwsem.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef __UM_RWSEM_H__ | 1 | #ifndef __UM_RWSEM_H__ |
2 | #define __UM_RWSEM_H__ | 2 | #define __UM_RWSEM_H__ |
3 | 3 | ||
4 | #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) | ||
5 | #define __builtin_expect(exp,c) (exp) | ||
6 | #endif | ||
7 | |||
8 | #include "asm/arch/rwsem.h" | 4 | #include "asm/arch/rwsem.h" |
9 | 5 | ||
10 | #endif | 6 | #endif |
diff --git a/include/asm-v850/cache.h b/include/asm-v850/cache.h index cbf9096e8517..8832c7ea3242 100644 --- a/include/asm-v850/cache.h +++ b/include/asm-v850/cache.h | |||
@@ -23,6 +23,4 @@ | |||
23 | #define L1_CACHE_SHIFT 4 | 23 | #define L1_CACHE_SHIFT 4 |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #define L1_CACHE_SHIFT_MAX L1_CACHE_SHIFT | ||
27 | |||
28 | #endif /* __V850_CACHE_H__ */ | 26 | #endif /* __V850_CACHE_H__ */ |
diff --git a/include/asm-v850/futex.h b/include/asm-v850/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-v850/futex.h +++ b/include/asm-v850/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-v850/unistd.h b/include/asm-v850/unistd.h index 5a86f8e976ec..82460a7bb233 100644 --- a/include/asm-v850/unistd.h +++ b/include/asm-v850/unistd.h | |||
@@ -241,9 +241,6 @@ | |||
241 | /* User programs sometimes end up including this header file | 241 | /* User programs sometimes end up including this header file |
242 | (indirectly, via uClibc header files), so I'm a bit nervous just | 242 | (indirectly, via uClibc header files), so I'm a bit nervous just |
243 | including <linux/compiler.h>. */ | 243 | including <linux/compiler.h>. */ |
244 | #if !defined(__builtin_expect) && __GNUC__ == 2 && __GNUC_MINOR__ < 96 | ||
245 | #define __builtin_expect(x, expected_value) (x) | ||
246 | #endif | ||
247 | 244 | ||
248 | #define __syscall_return(type, res) \ | 245 | #define __syscall_return(type, res) \ |
249 | do { \ | 246 | do { \ |
@@ -346,20 +343,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e) \ | |||
346 | __syscall_return (type, __ret); \ | 343 | __syscall_return (type, __ret); \ |
347 | } | 344 | } |
348 | 345 | ||
349 | #if __GNUC__ < 3 | ||
350 | /* In older versions of gcc, `asm' statements with more than 10 | ||
351 | input/output arguments produce a fatal error. To work around this | ||
352 | problem, we use two versions, one for gcc-3.x and one for earlier | ||
353 | versions of gcc (the `earlier gcc' version doesn't work with gcc-3.x | ||
354 | because gcc-3.x doesn't allow clobbers to also be input arguments). */ | ||
355 | #define __SYSCALL6_TRAP(syscall, ret, a, b, c, d, e, f) \ | ||
356 | __asm__ __volatile__ ("trap " SYSCALL_LONG_TRAP \ | ||
357 | : "=r" (ret), "=r" (syscall) \ | ||
358 | : "1" (syscall), \ | ||
359 | "r" (a), "r" (b), "r" (c), "r" (d), \ | ||
360 | "r" (e), "r" (f) \ | ||
361 | : SYSCALL_CLOBBERS, SYSCALL_ARG4, SYSCALL_ARG5); | ||
362 | #else /* __GNUC__ >= 3 */ | ||
363 | #define __SYSCALL6_TRAP(syscall, ret, a, b, c, d, e, f) \ | 346 | #define __SYSCALL6_TRAP(syscall, ret, a, b, c, d, e, f) \ |
364 | __asm__ __volatile__ ("trap " SYSCALL_LONG_TRAP \ | 347 | __asm__ __volatile__ ("trap " SYSCALL_LONG_TRAP \ |
365 | : "=r" (ret), "=r" (syscall), \ | 348 | : "=r" (ret), "=r" (syscall), \ |
@@ -368,7 +351,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e) \ | |||
368 | "r" (a), "r" (b), "r" (c), "r" (d), \ | 351 | "r" (a), "r" (b), "r" (c), "r" (d), \ |
369 | "2" (e), "3" (f) \ | 352 | "2" (e), "3" (f) \ |
370 | : SYSCALL_CLOBBERS); | 353 | : SYSCALL_CLOBBERS); |
371 | #endif | ||
372 | 354 | ||
373 | #define _syscall6(type, name, atype, a, btype, b, ctype, c, dtype, d, etype, e, ftype, f) \ | 355 | #define _syscall6(type, name, atype, a, btype, b, ctype, c, dtype, d, etype, e, ftype, f) \ |
374 | type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \ | 356 | type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \ |
diff --git a/include/asm-x86_64/cache.h b/include/asm-x86_64/cache.h index 33e53424128b..b4a2401de77b 100644 --- a/include/asm-x86_64/cache.h +++ b/include/asm-x86_64/cache.h | |||
@@ -9,6 +9,5 @@ | |||
9 | /* L1 cache line size */ | 9 | /* L1 cache line size */ |
10 | #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) | 10 | #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) |
11 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 11 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
12 | #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */ | ||
13 | 12 | ||
14 | #endif | 13 | #endif |
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h index d5166ec3868d..e8843362a6cc 100644 --- a/include/asm-x86_64/ia32_unistd.h +++ b/include/asm-x86_64/ia32_unistd.h | |||
@@ -299,7 +299,8 @@ | |||
299 | #define __NR_ia32_inotify_init 291 | 299 | #define __NR_ia32_inotify_init 291 |
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 | 303 | ||
303 | #define IA32_NR_syscalls 294 /* must be > than biggest syscall! */ | 304 | #define IA32_NR_syscalls 295 /* must be > than biggest syscall! */ |
304 | 305 | ||
305 | #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ | 306 | #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ |
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index 2c42150bce0c..e6f896161c11 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -571,8 +571,10 @@ __SYSCALL(__NR_inotify_init, sys_inotify_init) | |||
571 | __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) | 571 | __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) |
572 | #define __NR_inotify_rm_watch 255 | 572 | #define __NR_inotify_rm_watch 255 |
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 | ||
575 | __SYSCALL(__NR_migrate_pages, sys_migrate_pages) | ||
574 | 576 | ||
575 | #define __NR_syscall_max __NR_inotify_rm_watch | 577 | #define __NR_syscall_max __NR_migrate_pages |
576 | #ifndef __NO_STUBS | 578 | #ifndef __NO_STUBS |
577 | 579 | ||
578 | /* user-visible error numbers are in the range -1 - -4095 */ | 580 | /* user-visible error numbers are in the range -1 - -4095 */ |
diff --git a/include/linux/aio.h b/include/linux/aio.h index 49fd37629ee4..00c8efa95cc3 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -94,26 +94,27 @@ struct kiocb { | |||
94 | ssize_t (*ki_retry)(struct kiocb *); | 94 | ssize_t (*ki_retry)(struct kiocb *); |
95 | void (*ki_dtor)(struct kiocb *); | 95 | void (*ki_dtor)(struct kiocb *); |
96 | 96 | ||
97 | struct list_head ki_list; /* the aio core uses this | ||
98 | * for cancellation */ | ||
99 | |||
100 | union { | 97 | union { |
101 | void __user *user; | 98 | void __user *user; |
102 | struct task_struct *tsk; | 99 | struct task_struct *tsk; |
103 | } ki_obj; | 100 | } ki_obj; |
101 | |||
104 | __u64 ki_user_data; /* user's data for completion */ | 102 | __u64 ki_user_data; /* user's data for completion */ |
103 | wait_queue_t ki_wait; | ||
105 | loff_t ki_pos; | 104 | loff_t ki_pos; |
105 | |||
106 | void *private; | ||
106 | /* State that we remember to be able to restart/retry */ | 107 | /* State that we remember to be able to restart/retry */ |
107 | unsigned short ki_opcode; | 108 | unsigned short ki_opcode; |
108 | size_t ki_nbytes; /* copy of iocb->aio_nbytes */ | 109 | size_t ki_nbytes; /* copy of iocb->aio_nbytes */ |
109 | char __user *ki_buf; /* remaining iocb->aio_buf */ | 110 | char __user *ki_buf; /* remaining iocb->aio_buf */ |
110 | size_t ki_left; /* remaining bytes */ | 111 | size_t ki_left; /* remaining bytes */ |
111 | wait_queue_t ki_wait; | ||
112 | long ki_retried; /* just for testing */ | 112 | long ki_retried; /* just for testing */ |
113 | long ki_kicked; /* just for testing */ | 113 | long ki_kicked; /* just for testing */ |
114 | long ki_queued; /* just for testing */ | 114 | long ki_queued; /* just for testing */ |
115 | 115 | ||
116 | void *private; | 116 | struct list_head ki_list; /* the aio core uses this |
117 | * for cancellation */ | ||
117 | }; | 118 | }; |
118 | 119 | ||
119 | #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) | 120 | #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) |
@@ -126,6 +127,7 @@ struct kiocb { | |||
126 | (x)->ki_filp = (filp); \ | 127 | (x)->ki_filp = (filp); \ |
127 | (x)->ki_ctx = NULL; \ | 128 | (x)->ki_ctx = NULL; \ |
128 | (x)->ki_cancel = NULL; \ | 129 | (x)->ki_cancel = NULL; \ |
130 | (x)->ki_retry = NULL; \ | ||
129 | (x)->ki_dtor = NULL; \ | 131 | (x)->ki_dtor = NULL; \ |
130 | (x)->ki_obj.tsk = tsk; \ | 132 | (x)->ki_obj.tsk = tsk; \ |
131 | (x)->ki_user_data = 0; \ | 133 | (x)->ki_user_data = 0; \ |
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 911c09cb9bf9..6ba3aa8a81f4 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
@@ -155,15 +155,15 @@ struct elapaarp { | |||
155 | #define AARP_REQUEST 1 | 155 | #define AARP_REQUEST 1 |
156 | #define AARP_REPLY 2 | 156 | #define AARP_REPLY 2 |
157 | #define AARP_PROBE 3 | 157 | #define AARP_PROBE 3 |
158 | __u8 hw_src[ETH_ALEN] __attribute__ ((packed)); | 158 | __u8 hw_src[ETH_ALEN]; |
159 | __u8 pa_src_zero __attribute__ ((packed)); | 159 | __u8 pa_src_zero; |
160 | __be16 pa_src_net __attribute__ ((packed)); | 160 | __be16 pa_src_net; |
161 | __u8 pa_src_node __attribute__ ((packed)); | 161 | __u8 pa_src_node; |
162 | __u8 hw_dst[ETH_ALEN] __attribute__ ((packed)); | 162 | __u8 hw_dst[ETH_ALEN]; |
163 | __u8 pa_dst_zero __attribute__ ((packed)); | 163 | __u8 pa_dst_zero; |
164 | __be16 pa_dst_net __attribute__ ((packed)); | 164 | __be16 pa_dst_net; |
165 | __u8 pa_dst_node __attribute__ ((packed)); | 165 | __u8 pa_dst_node; |
166 | }; | 166 | } __attribute__ ((packed)); |
167 | 167 | ||
168 | static __inline__ struct elapaarp *aarp_hdr(struct sk_buff *skb) | 168 | static __inline__ struct elapaarp *aarp_hdr(struct sk_buff *skb) |
169 | { | 169 | { |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 1db061bb6b08..9f159baf153f 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -197,7 +197,8 @@ int block_read_full_page(struct page*, get_block_t*); | |||
197 | int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); | 197 | int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); |
198 | int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*, | 198 | int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*, |
199 | loff_t *); | 199 | loff_t *); |
200 | int generic_cont_expand(struct inode *inode, loff_t size) ; | 200 | int generic_cont_expand(struct inode *inode, loff_t size); |
201 | int generic_cont_expand_simple(struct inode *inode, loff_t size); | ||
201 | int block_commit_write(struct page *page, unsigned from, unsigned to); | 202 | int block_commit_write(struct page *page, unsigned from, unsigned to); |
202 | int block_sync_page(struct page *); | 203 | int block_sync_page(struct page *); |
203 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); | 204 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); |
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index 04bd756efc67..e86e4a938373 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h | |||
@@ -156,7 +156,7 @@ extern __be32 htonl(__u32); | |||
156 | extern __u16 ntohs(__be16); | 156 | extern __u16 ntohs(__be16); |
157 | extern __be16 htons(__u16); | 157 | extern __be16 htons(__u16); |
158 | 158 | ||
159 | #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) | 159 | #if defined(__GNUC__) && defined(__OPTIMIZE__) |
160 | 160 | ||
161 | #define ___htonl(x) __cpu_to_be32(x) | 161 | #define ___htonl(x) __cpu_to_be32(x) |
162 | #define ___htons(x) __cpu_to_be16(x) | 162 | #define ___htons(x) __cpu_to_be16(x) |
diff --git a/include/linux/byteorder/swab.h b/include/linux/byteorder/swab.h index 2f1cb775125a..25f7f32883ec 100644 --- a/include/linux/byteorder/swab.h +++ b/include/linux/byteorder/swab.h | |||
@@ -110,7 +110,7 @@ | |||
110 | /* | 110 | /* |
111 | * Allow constant folding | 111 | * Allow constant folding |
112 | */ | 112 | */ |
113 | #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) | 113 | #if defined(__GNUC__) && defined(__OPTIMIZE__) |
114 | # define __swab16(x) \ | 114 | # define __swab16(x) \ |
115 | (__builtin_constant_p((__u16)(x)) ? \ | 115 | (__builtin_constant_p((__u16)(x)) ? \ |
116 | ___swab16((x)) : \ | 116 | ___swab16((x)) : \ |
diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index d5f2a3205109..ae5e5f914bf4 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h | |||
@@ -77,7 +77,7 @@ | |||
77 | /* | 77 | /* |
78 | * Allow constant folding | 78 | * Allow constant folding |
79 | */ | 79 | */ |
80 | #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) | 80 | #if defined(__GNUC__) && defined(__OPTIMIZE__) |
81 | # define __swahw32(x) \ | 81 | # define __swahw32(x) \ |
82 | (__builtin_constant_p((__u32)(x)) ? \ | 82 | (__builtin_constant_p((__u32)(x)) ? \ |
83 | ___swahw32((x)) : \ | 83 | ___swahw32((x)) : \ |
diff --git a/include/linux/cache.h b/include/linux/cache.h index 0b7ecf3af78a..ffe52210fc4f 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h | |||
@@ -45,12 +45,21 @@ | |||
45 | #endif /* CONFIG_SMP */ | 45 | #endif /* CONFIG_SMP */ |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #if !defined(____cacheline_maxaligned_in_smp) | 48 | /* |
49 | * The maximum alignment needed for some critical structures | ||
50 | * These could be inter-node cacheline sizes/L3 cacheline | ||
51 | * size etc. Define this in asm/cache.h for your arch | ||
52 | */ | ||
53 | #ifndef INTERNODE_CACHE_SHIFT | ||
54 | #define INTERNODE_CACHE_SHIFT L1_CACHE_SHIFT | ||
55 | #endif | ||
56 | |||
57 | #if !defined(____cacheline_internodealigned_in_smp) | ||
49 | #if defined(CONFIG_SMP) | 58 | #if defined(CONFIG_SMP) |
50 | #define ____cacheline_maxaligned_in_smp \ | 59 | #define ____cacheline_internodealigned_in_smp \ |
51 | __attribute__((__aligned__(1 << (L1_CACHE_SHIFT_MAX)))) | 60 | __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) |
52 | #else | 61 | #else |
53 | #define ____cacheline_maxaligned_in_smp | 62 | #define ____cacheline_internodealigned_in_smp |
54 | #endif | 63 | #endif |
55 | #endif | 64 | #endif |
56 | 65 | ||
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 152734055403..2e05e1e6b0e6 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -15,3 +15,12 @@ | |||
15 | ({ unsigned long __ptr; \ | 15 | ({ unsigned long __ptr; \ |
16 | __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \ | 16 | __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \ |
17 | (typeof(ptr)) (__ptr + (off)); }) | 17 | (typeof(ptr)) (__ptr + (off)); }) |
18 | |||
19 | |||
20 | #define inline inline __attribute__((always_inline)) | ||
21 | #define __inline__ __inline__ __attribute__((always_inline)) | ||
22 | #define __inline __inline __attribute__((always_inline)) | ||
23 | #define __deprecated __attribute__((deprecated)) | ||
24 | #define noinline __attribute__((noinline)) | ||
25 | #define __attribute_pure__ __attribute__((pure)) | ||
26 | #define __attribute_const__ __attribute__((__const__)) | ||
diff --git a/include/linux/compiler-gcc2.h b/include/linux/compiler-gcc2.h deleted file mode 100644 index ebed17660c5f..000000000000 --- a/include/linux/compiler-gcc2.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* Never include this file directly. Include <linux/compiler.h> instead. */ | ||
2 | |||
3 | /* These definitions are for GCC v2.x. */ | ||
4 | |||
5 | /* Somewhere in the middle of the GCC 2.96 development cycle, we implemented | ||
6 | a mechanism by which the user can annotate likely branch directions and | ||
7 | expect the blocks to be reordered appropriately. Define __builtin_expect | ||
8 | to nothing for earlier compilers. */ | ||
9 | #include <linux/compiler-gcc.h> | ||
10 | |||
11 | #if __GNUC_MINOR__ < 96 | ||
12 | # define __builtin_expect(x, expected_value) (x) | ||
13 | #endif | ||
14 | |||
15 | #define __attribute_used__ __attribute__((__unused__)) | ||
16 | |||
17 | /* | ||
18 | * The attribute `pure' is not implemented in GCC versions earlier | ||
19 | * than 2.96. | ||
20 | */ | ||
21 | #if __GNUC_MINOR__ >= 96 | ||
22 | # define __attribute_pure__ __attribute__((pure)) | ||
23 | # define __attribute_const__ __attribute__((__const__)) | ||
24 | #endif | ||
25 | |||
26 | /* GCC 2.95.x/2.96 recognize __va_copy, but not va_copy. Actually later GCC's | ||
27 | * define both va_copy and __va_copy, but the latter may go away, so limit this | ||
28 | * to this header */ | ||
29 | #define va_copy __va_copy | ||
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index a6fa615afab5..4209082ee934 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h | |||
@@ -3,29 +3,12 @@ | |||
3 | /* These definitions are for GCC v3.x. */ | 3 | /* These definitions are for GCC v3.x. */ |
4 | #include <linux/compiler-gcc.h> | 4 | #include <linux/compiler-gcc.h> |
5 | 5 | ||
6 | #if __GNUC_MINOR__ >= 1 | ||
7 | # define inline inline __attribute__((always_inline)) | ||
8 | # define __inline__ __inline__ __attribute__((always_inline)) | ||
9 | # define __inline __inline __attribute__((always_inline)) | ||
10 | #endif | ||
11 | |||
12 | #if __GNUC_MINOR__ > 0 | ||
13 | # define __deprecated __attribute__((deprecated)) | ||
14 | #endif | ||
15 | |||
16 | #if __GNUC_MINOR__ >= 3 | 6 | #if __GNUC_MINOR__ >= 3 |
17 | # define __attribute_used__ __attribute__((__used__)) | 7 | # define __attribute_used__ __attribute__((__used__)) |
18 | #else | 8 | #else |
19 | # define __attribute_used__ __attribute__((__unused__)) | 9 | # define __attribute_used__ __attribute__((__unused__)) |
20 | #endif | 10 | #endif |
21 | 11 | ||
22 | #define __attribute_pure__ __attribute__((pure)) | ||
23 | #define __attribute_const__ __attribute__((__const__)) | ||
24 | |||
25 | #if __GNUC_MINOR__ >= 1 | ||
26 | #define noinline __attribute__((noinline)) | ||
27 | #endif | ||
28 | |||
29 | #if __GNUC_MINOR__ >= 4 | 12 | #if __GNUC_MINOR__ >= 4 |
30 | #define __must_check __attribute__((warn_unused_result)) | 13 | #define __must_check __attribute__((warn_unused_result)) |
31 | #endif | 14 | #endif |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 53686c037a06..e913e9beaf69 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -3,14 +3,7 @@ | |||
3 | /* These definitions are for GCC v4.x. */ | 3 | /* These definitions are for GCC v4.x. */ |
4 | #include <linux/compiler-gcc.h> | 4 | #include <linux/compiler-gcc.h> |
5 | 5 | ||
6 | #define inline inline __attribute__((always_inline)) | ||
7 | #define __inline__ __inline__ __attribute__((always_inline)) | ||
8 | #define __inline __inline __attribute__((always_inline)) | ||
9 | #define __deprecated __attribute__((deprecated)) | ||
10 | #define __attribute_used__ __attribute__((__used__)) | 6 | #define __attribute_used__ __attribute__((__used__)) |
11 | #define __attribute_pure__ __attribute__((pure)) | ||
12 | #define __attribute_const__ __attribute__((__const__)) | ||
13 | #define noinline __attribute__((noinline)) | ||
14 | #define __must_check __attribute__((warn_unused_result)) | 7 | #define __must_check __attribute__((warn_unused_result)) |
15 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 8 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
16 | 9 | ||
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index d7378215b851..f23d3c6fc2c0 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -42,8 +42,6 @@ extern void __chk_io_ptr(void __iomem *); | |||
42 | # include <linux/compiler-gcc4.h> | 42 | # include <linux/compiler-gcc4.h> |
43 | #elif __GNUC__ == 3 | 43 | #elif __GNUC__ == 3 |
44 | # include <linux/compiler-gcc3.h> | 44 | # include <linux/compiler-gcc3.h> |
45 | #elif __GNUC__ == 2 | ||
46 | # include <linux/compiler-gcc2.h> | ||
47 | #else | 45 | #else |
48 | # error Sorry, your compiler is too old/not recognized. | 46 | # error Sorry, your compiler is too old/not recognized. |
49 | #endif | 47 | #endif |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 6e2deef96b34..c472f972bd6d 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -14,22 +14,43 @@ | |||
14 | 14 | ||
15 | #ifdef CONFIG_CPUSETS | 15 | #ifdef CONFIG_CPUSETS |
16 | 16 | ||
17 | extern int number_of_cpusets; /* How many cpusets are defined in system? */ | ||
18 | |||
19 | extern int cpuset_init_early(void); | ||
17 | extern int cpuset_init(void); | 20 | extern int cpuset_init(void); |
18 | extern void cpuset_init_smp(void); | 21 | extern void cpuset_init_smp(void); |
19 | extern void cpuset_fork(struct task_struct *p); | 22 | extern void cpuset_fork(struct task_struct *p); |
20 | extern void cpuset_exit(struct task_struct *p); | 23 | extern void cpuset_exit(struct task_struct *p); |
21 | extern cpumask_t cpuset_cpus_allowed(const struct task_struct *p); | 24 | extern cpumask_t cpuset_cpus_allowed(struct task_struct *p); |
25 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); | ||
22 | void cpuset_init_current_mems_allowed(void); | 26 | void cpuset_init_current_mems_allowed(void); |
23 | void cpuset_update_current_mems_allowed(void); | 27 | void cpuset_update_task_memory_state(void); |
24 | void cpuset_restrict_to_mems_allowed(unsigned long *nodes); | 28 | #define cpuset_nodes_subset_current_mems_allowed(nodes) \ |
29 | nodes_subset((nodes), current->mems_allowed) | ||
25 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); | 30 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); |
26 | extern int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask); | 31 | |
32 | extern int __cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask); | ||
33 | static int inline cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask) | ||
34 | { | ||
35 | return number_of_cpusets <= 1 || __cpuset_zone_allowed(z, gfp_mask); | ||
36 | } | ||
37 | |||
27 | extern int cpuset_excl_nodes_overlap(const struct task_struct *p); | 38 | extern int cpuset_excl_nodes_overlap(const struct task_struct *p); |
39 | |||
40 | #define cpuset_memory_pressure_bump() \ | ||
41 | do { \ | ||
42 | if (cpuset_memory_pressure_enabled) \ | ||
43 | __cpuset_memory_pressure_bump(); \ | ||
44 | } while (0) | ||
45 | extern int cpuset_memory_pressure_enabled; | ||
46 | extern void __cpuset_memory_pressure_bump(void); | ||
47 | |||
28 | extern struct file_operations proc_cpuset_operations; | 48 | extern struct file_operations proc_cpuset_operations; |
29 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); | 49 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); |
30 | 50 | ||
31 | #else /* !CONFIG_CPUSETS */ | 51 | #else /* !CONFIG_CPUSETS */ |
32 | 52 | ||
53 | static inline int cpuset_init_early(void) { return 0; } | ||
33 | static inline int cpuset_init(void) { return 0; } | 54 | static inline int cpuset_init(void) { return 0; } |
34 | static inline void cpuset_init_smp(void) {} | 55 | static inline void cpuset_init_smp(void) {} |
35 | static inline void cpuset_fork(struct task_struct *p) {} | 56 | static inline void cpuset_fork(struct task_struct *p) {} |
@@ -40,9 +61,14 @@ static inline cpumask_t cpuset_cpus_allowed(struct task_struct *p) | |||
40 | return cpu_possible_map; | 61 | return cpu_possible_map; |
41 | } | 62 | } |
42 | 63 | ||
64 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) | ||
65 | { | ||
66 | return node_possible_map; | ||
67 | } | ||
68 | |||
43 | static inline void cpuset_init_current_mems_allowed(void) {} | 69 | static inline void cpuset_init_current_mems_allowed(void) {} |
44 | static inline void cpuset_update_current_mems_allowed(void) {} | 70 | static inline void cpuset_update_task_memory_state(void) {} |
45 | static inline void cpuset_restrict_to_mems_allowed(unsigned long *nodes) {} | 71 | #define cpuset_nodes_subset_current_mems_allowed(nodes) (1) |
46 | 72 | ||
47 | static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) | 73 | static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) |
48 | { | 74 | { |
@@ -59,6 +85,8 @@ static inline int cpuset_excl_nodes_overlap(const struct task_struct *p) | |||
59 | return 1; | 85 | return 1; |
60 | } | 86 | } |
61 | 87 | ||
88 | static inline void cpuset_memory_pressure_bump(void) {} | ||
89 | |||
62 | static inline char *cpuset_task_status_allowed(struct task_struct *task, | 90 | static inline char *cpuset_task_status_allowed(struct task_struct *task, |
63 | char *buffer) | 91 | char *buffer) |
64 | { | 92 | { |
diff --git a/include/linux/cycx_x25.h b/include/linux/cycx_x25.h index b10a7f3a8cac..f7a906583463 100644 --- a/include/linux/cycx_x25.h +++ b/include/linux/cycx_x25.h | |||
@@ -38,11 +38,11 @@ extern unsigned int cycx_debug; | |||
38 | /* Data Structures */ | 38 | /* Data Structures */ |
39 | /* X.25 Command Block. */ | 39 | /* X.25 Command Block. */ |
40 | struct cycx_x25_cmd { | 40 | struct cycx_x25_cmd { |
41 | u16 command PACKED; | 41 | u16 command; |
42 | u16 link PACKED; /* values: 0 or 1 */ | 42 | u16 link; /* values: 0 or 1 */ |
43 | u16 len PACKED; /* values: 0 thru 0x205 (517) */ | 43 | u16 len; /* values: 0 thru 0x205 (517) */ |
44 | u32 buf PACKED; | 44 | u32 buf; |
45 | }; | 45 | } PACKED; |
46 | 46 | ||
47 | /* Defines for the 'command' field. */ | 47 | /* Defines for the 'command' field. */ |
48 | #define X25_CONNECT_REQUEST 0x4401 | 48 | #define X25_CONNECT_REQUEST 0x4401 |
@@ -92,34 +92,34 @@ struct cycx_x25_cmd { | |||
92 | * @flags - see dosx25.doc, in portuguese, for details | 92 | * @flags - see dosx25.doc, in portuguese, for details |
93 | */ | 93 | */ |
94 | struct cycx_x25_config { | 94 | struct cycx_x25_config { |
95 | u8 link PACKED; | 95 | u8 link; |
96 | u8 speed PACKED; | 96 | u8 speed; |
97 | u8 clock PACKED; | 97 | u8 clock; |
98 | u8 n2 PACKED; | 98 | u8 n2; |
99 | u8 n2win PACKED; | 99 | u8 n2win; |
100 | u8 n3win PACKED; | 100 | u8 n3win; |
101 | u8 nvc PACKED; | 101 | u8 nvc; |
102 | u8 pktlen PACKED; | 102 | u8 pktlen; |
103 | u8 locaddr PACKED; | 103 | u8 locaddr; |
104 | u8 remaddr PACKED; | 104 | u8 remaddr; |
105 | u16 t1 PACKED; | 105 | u16 t1; |
106 | u16 t2 PACKED; | 106 | u16 t2; |
107 | u8 t21 PACKED; | 107 | u8 t21; |
108 | u8 npvc PACKED; | 108 | u8 npvc; |
109 | u8 t23 PACKED; | 109 | u8 t23; |
110 | u8 flags PACKED; | 110 | u8 flags; |
111 | }; | 111 | } PACKED; |
112 | 112 | ||
113 | struct cycx_x25_stats { | 113 | struct cycx_x25_stats { |
114 | u16 rx_crc_errors PACKED; | 114 | u16 rx_crc_errors; |
115 | u16 rx_over_errors PACKED; | 115 | u16 rx_over_errors; |
116 | u16 n2_tx_frames PACKED; | 116 | u16 n2_tx_frames; |
117 | u16 n2_rx_frames PACKED; | 117 | u16 n2_rx_frames; |
118 | u16 tx_timeouts PACKED; | 118 | u16 tx_timeouts; |
119 | u16 rx_timeouts PACKED; | 119 | u16 rx_timeouts; |
120 | u16 n3_tx_packets PACKED; | 120 | u16 n3_tx_packets; |
121 | u16 n3_rx_packets PACKED; | 121 | u16 n3_rx_packets; |
122 | u16 tx_aborts PACKED; | 122 | u16 tx_aborts; |
123 | u16 rx_aborts PACKED; | 123 | u16 rx_aborts; |
124 | }; | 124 | } PACKED; |
125 | #endif /* _CYCX_X25_H */ | 125 | #endif /* _CYCX_X25_H */ |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 46a2ba617595..a3ed5e059d47 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -95,14 +95,19 @@ struct dentry { | |||
95 | struct qstr d_name; | 95 | struct qstr d_name; |
96 | 96 | ||
97 | struct list_head d_lru; /* LRU list */ | 97 | struct list_head d_lru; /* LRU list */ |
98 | struct list_head d_child; /* child of parent list */ | 98 | /* |
99 | * d_child and d_rcu can share memory | ||
100 | */ | ||
101 | union { | ||
102 | struct list_head d_child; /* child of parent list */ | ||
103 | struct rcu_head d_rcu; | ||
104 | } d_u; | ||
99 | struct list_head d_subdirs; /* our children */ | 105 | struct list_head d_subdirs; /* our children */ |
100 | struct list_head d_alias; /* inode alias list */ | 106 | struct list_head d_alias; /* inode alias list */ |
101 | unsigned long d_time; /* used by d_revalidate */ | 107 | unsigned long d_time; /* used by d_revalidate */ |
102 | struct dentry_operations *d_op; | 108 | struct dentry_operations *d_op; |
103 | struct super_block *d_sb; /* The root of the dentry tree */ | 109 | struct super_block *d_sb; /* The root of the dentry tree */ |
104 | void *d_fsdata; /* fs-specific data */ | 110 | void *d_fsdata; /* fs-specific data */ |
105 | struct rcu_head d_rcu; | ||
106 | struct dcookie_struct *d_cookie; /* cookie, if any */ | 111 | struct dcookie_struct *d_cookie; /* cookie, if any */ |
107 | int d_mounted; | 112 | int d_mounted; |
108 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ | 113 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ |
diff --git a/include/linux/elf.h b/include/linux/elf.h index ff955dbf510d..d3bfacb24496 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -151,6 +151,8 @@ typedef __s64 Elf64_Sxword; | |||
151 | #define STT_FUNC 2 | 151 | #define STT_FUNC 2 |
152 | #define STT_SECTION 3 | 152 | #define STT_SECTION 3 |
153 | #define STT_FILE 4 | 153 | #define STT_FILE 4 |
154 | #define STT_COMMON 5 | ||
155 | #define STT_TLS 6 | ||
154 | 156 | ||
155 | #define ELF_ST_BIND(x) ((x) >> 4) | 157 | #define ELF_ST_BIND(x) ((x) >> 4) |
156 | #define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf) | 158 | #define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2c9c48d65630..4c82219b0fae 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/config.h> | 9 | #include <linux/config.h> |
10 | #include <linux/limits.h> | 10 | #include <linux/limits.h> |
11 | #include <linux/ioctl.h> | 11 | #include <linux/ioctl.h> |
12 | #include <linux/rcuref.h> | ||
13 | 12 | ||
14 | /* | 13 | /* |
15 | * It's silly to have NR_OPEN bigger than NR_FILE, but you can change | 14 | * It's silly to have NR_OPEN bigger than NR_FILE, but you can change |
@@ -104,11 +103,11 @@ extern int dir_notify_enable; | |||
104 | #define MS_MOVE 8192 | 103 | #define MS_MOVE 8192 |
105 | #define MS_REC 16384 | 104 | #define MS_REC 16384 |
106 | #define MS_VERBOSE 32768 | 105 | #define MS_VERBOSE 32768 |
106 | #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ | ||
107 | #define MS_UNBINDABLE (1<<17) /* change to unbindable */ | 107 | #define MS_UNBINDABLE (1<<17) /* change to unbindable */ |
108 | #define MS_PRIVATE (1<<18) /* change to private */ | 108 | #define MS_PRIVATE (1<<18) /* change to private */ |
109 | #define MS_SLAVE (1<<19) /* change to slave */ | 109 | #define MS_SLAVE (1<<19) /* change to slave */ |
110 | #define MS_SHARED (1<<20) /* change to shared */ | 110 | #define MS_SHARED (1<<20) /* change to shared */ |
111 | #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ | ||
112 | #define MS_ACTIVE (1<<30) | 111 | #define MS_ACTIVE (1<<30) |
113 | #define MS_NOUSER (1<<31) | 112 | #define MS_NOUSER (1<<31) |
114 | 113 | ||
@@ -225,6 +224,7 @@ extern int dir_notify_enable; | |||
225 | #include <asm/semaphore.h> | 224 | #include <asm/semaphore.h> |
226 | #include <asm/byteorder.h> | 225 | #include <asm/byteorder.h> |
227 | 226 | ||
227 | struct hd_geometry; | ||
228 | struct iovec; | 228 | struct iovec; |
229 | struct nameidata; | 229 | struct nameidata; |
230 | struct kiocb; | 230 | struct kiocb; |
@@ -653,7 +653,7 @@ extern spinlock_t files_lock; | |||
653 | #define file_list_lock() spin_lock(&files_lock); | 653 | #define file_list_lock() spin_lock(&files_lock); |
654 | #define file_list_unlock() spin_unlock(&files_lock); | 654 | #define file_list_unlock() spin_unlock(&files_lock); |
655 | 655 | ||
656 | #define get_file(x) rcuref_inc(&(x)->f_count) | 656 | #define get_file(x) atomic_inc(&(x)->f_count) |
657 | #define file_count(x) atomic_read(&(x)->f_count) | 657 | #define file_count(x) atomic_read(&(x)->f_count) |
658 | 658 | ||
659 | #define MAX_NON_LFS ((1UL<<31) - 1) | 659 | #define MAX_NON_LFS ((1UL<<31) - 1) |
@@ -808,7 +808,6 @@ struct super_block { | |||
808 | struct list_head s_list; /* Keep this first */ | 808 | struct list_head s_list; /* Keep this first */ |
809 | dev_t s_dev; /* search index; _not_ kdev_t */ | 809 | dev_t s_dev; /* search index; _not_ kdev_t */ |
810 | unsigned long s_blocksize; | 810 | unsigned long s_blocksize; |
811 | unsigned long s_old_blocksize; | ||
812 | unsigned char s_blocksize_bits; | 811 | unsigned char s_blocksize_bits; |
813 | unsigned char s_dirt; | 812 | unsigned char s_dirt; |
814 | unsigned long long s_maxbytes; /* Max file size */ | 813 | unsigned long long s_maxbytes; /* Max file size */ |
@@ -963,6 +962,7 @@ struct block_device_operations { | |||
963 | int (*direct_access) (struct block_device *, sector_t, unsigned long *); | 962 | int (*direct_access) (struct block_device *, sector_t, unsigned long *); |
964 | int (*media_changed) (struct gendisk *); | 963 | int (*media_changed) (struct gendisk *); |
965 | int (*revalidate_disk) (struct gendisk *); | 964 | int (*revalidate_disk) (struct gendisk *); |
965 | int (*getgeo)(struct block_device *, struct hd_geometry *); | ||
966 | struct module *owner; | 966 | struct module *owner; |
967 | }; | 967 | }; |
968 | 968 | ||
@@ -1345,7 +1345,8 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
1345 | 1345 | ||
1346 | /* fs/open.c */ | 1346 | /* fs/open.c */ |
1347 | 1347 | ||
1348 | extern int do_truncate(struct dentry *, loff_t start, struct file *filp); | 1348 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, |
1349 | struct file *filp); | ||
1349 | extern long do_sys_open(const char __user *filename, int flags, int mode); | 1350 | extern long do_sys_open(const char __user *filename, int flags, int mode); |
1350 | extern struct file *filp_open(const char *, int, int); | 1351 | extern struct file *filp_open(const char *, int, int); |
1351 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); | 1352 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 7b6a6a58e465..4dd6694963c0 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -801,7 +801,7 @@ typedef struct hwif_s { | |||
801 | unsigned dma; | 801 | unsigned dma; |
802 | 802 | ||
803 | void (*led_act)(void *data, int rw); | 803 | void (*led_act)(void *data, int rw); |
804 | } ____cacheline_maxaligned_in_smp ide_hwif_t; | 804 | } ____cacheline_internodealigned_in_smp ide_hwif_t; |
805 | 805 | ||
806 | /* | 806 | /* |
807 | * internal ide interrupt handler type | 807 | * internal ide interrupt handler type |
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h index 511999c7eeda..395f0aad9cbf 100644 --- a/include/linux/if_frad.h +++ b/include/linux/if_frad.h | |||
@@ -131,17 +131,17 @@ struct frad_conf | |||
131 | /* these are the fields of an RFC 1490 header */ | 131 | /* these are the fields of an RFC 1490 header */ |
132 | struct frhdr | 132 | struct frhdr |
133 | { | 133 | { |
134 | unsigned char control __attribute__((packed)); | 134 | unsigned char control; |
135 | 135 | ||
136 | /* for IP packets, this can be the NLPID */ | 136 | /* for IP packets, this can be the NLPID */ |
137 | unsigned char pad __attribute__((packed)); | 137 | unsigned char pad; |
138 | 138 | ||
139 | unsigned char NLPID __attribute__((packed)); | 139 | unsigned char NLPID; |
140 | unsigned char OUI[3] __attribute__((packed)); | 140 | unsigned char OUI[3]; |
141 | unsigned short PID __attribute__((packed)); | 141 | unsigned short PID; |
142 | 142 | ||
143 | #define IP_NLPID pad | 143 | #define IP_NLPID pad |
144 | }; | 144 | } __attribute__((packed)); |
145 | 145 | ||
146 | /* see RFC 1490 for the definition of the following */ | 146 | /* see RFC 1490 for the definition of the following */ |
147 | #define FRAD_I_UI 0x03 | 147 | #define FRAD_I_UI 0x03 |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 41f150a3d2dd..e50a95fbeb11 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -79,7 +79,7 @@ static inline void __deprecated save_flags(unsigned long *x) | |||
79 | { | 79 | { |
80 | local_save_flags(*x); | 80 | local_save_flags(*x); |
81 | } | 81 | } |
82 | #define save_flags(x) save_flags(&x); | 82 | #define save_flags(x) save_flags(&x) |
83 | static inline void __deprecated restore_flags(unsigned long x) | 83 | static inline void __deprecated restore_flags(unsigned long x) |
84 | { | 84 | { |
85 | local_irq_restore(x); | 85 | local_irq_restore(x); |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 93bbed5c6cf4..9c8f4c9ed429 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -191,6 +191,10 @@ struct inet6_skb_parm { | |||
191 | __u16 srcrt; | 191 | __u16 srcrt; |
192 | __u16 dst1; | 192 | __u16 dst1; |
193 | __u16 lastopt; | 193 | __u16 lastopt; |
194 | __u32 nhoff; | ||
195 | __u16 flags; | ||
196 | |||
197 | #define IP6SKB_XFRM_TRANSFORMED 1 | ||
194 | }; | 198 | }; |
195 | 199 | ||
196 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) | 200 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) |
diff --git a/include/linux/isdnif.h b/include/linux/isdnif.h index 7a4eacd77cb2..04e10f9f14f8 100644 --- a/include/linux/isdnif.h +++ b/include/linux/isdnif.h | |||
@@ -282,43 +282,43 @@ typedef struct setup_parm { | |||
282 | 282 | ||
283 | typedef struct T30_s { | 283 | typedef struct T30_s { |
284 | /* session parameters */ | 284 | /* session parameters */ |
285 | __u8 resolution __attribute__ ((packed)); | 285 | __u8 resolution; |
286 | __u8 rate __attribute__ ((packed)); | 286 | __u8 rate; |
287 | __u8 width __attribute__ ((packed)); | 287 | __u8 width; |
288 | __u8 length __attribute__ ((packed)); | 288 | __u8 length; |
289 | __u8 compression __attribute__ ((packed)); | 289 | __u8 compression; |
290 | __u8 ecm __attribute__ ((packed)); | 290 | __u8 ecm; |
291 | __u8 binary __attribute__ ((packed)); | 291 | __u8 binary; |
292 | __u8 scantime __attribute__ ((packed)); | 292 | __u8 scantime; |
293 | __u8 id[FAXIDLEN] __attribute__ ((packed)); | 293 | __u8 id[FAXIDLEN]; |
294 | /* additional parameters */ | 294 | /* additional parameters */ |
295 | __u8 phase __attribute__ ((packed)); | 295 | __u8 phase; |
296 | __u8 direction __attribute__ ((packed)); | 296 | __u8 direction; |
297 | __u8 code __attribute__ ((packed)); | 297 | __u8 code; |
298 | __u8 badlin __attribute__ ((packed)); | 298 | __u8 badlin; |
299 | __u8 badmul __attribute__ ((packed)); | 299 | __u8 badmul; |
300 | __u8 bor __attribute__ ((packed)); | 300 | __u8 bor; |
301 | __u8 fet __attribute__ ((packed)); | 301 | __u8 fet; |
302 | __u8 pollid[FAXIDLEN] __attribute__ ((packed)); | 302 | __u8 pollid[FAXIDLEN]; |
303 | __u8 cq __attribute__ ((packed)); | 303 | __u8 cq; |
304 | __u8 cr __attribute__ ((packed)); | 304 | __u8 cr; |
305 | __u8 ctcrty __attribute__ ((packed)); | 305 | __u8 ctcrty; |
306 | __u8 minsp __attribute__ ((packed)); | 306 | __u8 minsp; |
307 | __u8 phcto __attribute__ ((packed)); | 307 | __u8 phcto; |
308 | __u8 rel __attribute__ ((packed)); | 308 | __u8 rel; |
309 | __u8 nbc __attribute__ ((packed)); | 309 | __u8 nbc; |
310 | /* remote station parameters */ | 310 | /* remote station parameters */ |
311 | __u8 r_resolution __attribute__ ((packed)); | 311 | __u8 r_resolution; |
312 | __u8 r_rate __attribute__ ((packed)); | 312 | __u8 r_rate; |
313 | __u8 r_width __attribute__ ((packed)); | 313 | __u8 r_width; |
314 | __u8 r_length __attribute__ ((packed)); | 314 | __u8 r_length; |
315 | __u8 r_compression __attribute__ ((packed)); | 315 | __u8 r_compression; |
316 | __u8 r_ecm __attribute__ ((packed)); | 316 | __u8 r_ecm; |
317 | __u8 r_binary __attribute__ ((packed)); | 317 | __u8 r_binary; |
318 | __u8 r_scantime __attribute__ ((packed)); | 318 | __u8 r_scantime; |
319 | __u8 r_id[FAXIDLEN] __attribute__ ((packed)); | 319 | __u8 r_id[FAXIDLEN]; |
320 | __u8 r_code __attribute__ ((packed)); | 320 | __u8 r_code; |
321 | } T30_s; | 321 | } __attribute__((packed)) T30_s; |
322 | 322 | ||
323 | #define ISDN_TTY_FAX_CONN_IN 0 | 323 | #define ISDN_TTY_FAX_CONN_IN 0 |
324 | #define ISDN_TTY_FAX_CONN_OUT 1 | 324 | #define ISDN_TTY_FAX_CONN_OUT 1 |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b1e407a4fbda..ca7ff8fdd090 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -316,8 +316,6 @@ extern int randomize_va_space; | |||
316 | #endif | 316 | #endif |
317 | 317 | ||
318 | /* Trap pasters of __FUNCTION__ at compile-time */ | 318 | /* Trap pasters of __FUNCTION__ at compile-time */ |
319 | #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 | ||
320 | #define __FUNCTION__ (__func__) | 319 | #define __FUNCTION__ (__func__) |
321 | #endif | ||
322 | 320 | ||
323 | #endif | 321 | #endif |
diff --git a/include/linux/key.h b/include/linux/key.h index 4d189e51bc6c..cbf464ad9589 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -177,6 +177,8 @@ struct key { | |||
177 | /* | 177 | /* |
178 | * kernel managed key type definition | 178 | * kernel managed key type definition |
179 | */ | 179 | */ |
180 | typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, const char *op); | ||
181 | |||
180 | struct key_type { | 182 | struct key_type { |
181 | /* name of the type */ | 183 | /* name of the type */ |
182 | const char *name; | 184 | const char *name; |
@@ -218,6 +220,16 @@ struct key_type { | |||
218 | */ | 220 | */ |
219 | long (*read)(const struct key *key, char __user *buffer, size_t buflen); | 221 | long (*read)(const struct key *key, char __user *buffer, size_t buflen); |
220 | 222 | ||
223 | /* handle request_key() for this type instead of invoking | ||
224 | * /sbin/request-key (optional) | ||
225 | * - key is the key to instantiate | ||
226 | * - authkey is the authority to assume when instantiating this key | ||
227 | * - op is the operation to be done, usually "create" | ||
228 | * - the call must not return until the instantiation process has run | ||
229 | * its course | ||
230 | */ | ||
231 | request_key_actor_t request_key; | ||
232 | |||
221 | /* internal fields */ | 233 | /* internal fields */ |
222 | struct list_head link; /* link in types list */ | 234 | struct list_head link; /* link in types list */ |
223 | }; | 235 | }; |
diff --git a/include/linux/keyctl.h b/include/linux/keyctl.h index 8d7c59a29e09..3365945640c9 100644 --- a/include/linux/keyctl.h +++ b/include/linux/keyctl.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define KEY_SPEC_USER_KEYRING -4 /* - key ID for UID-specific keyring */ | 19 | #define KEY_SPEC_USER_KEYRING -4 /* - key ID for UID-specific keyring */ |
20 | #define KEY_SPEC_USER_SESSION_KEYRING -5 /* - key ID for UID-session keyring */ | 20 | #define KEY_SPEC_USER_SESSION_KEYRING -5 /* - key ID for UID-session keyring */ |
21 | #define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */ | 21 | #define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */ |
22 | #define KEY_SPEC_REQKEY_AUTH_KEY -7 /* - key ID for assumed request_key auth key */ | ||
22 | 23 | ||
23 | /* request-key default keyrings */ | 24 | /* request-key default keyrings */ |
24 | #define KEY_REQKEY_DEFL_NO_CHANGE -1 | 25 | #define KEY_REQKEY_DEFL_NO_CHANGE -1 |
@@ -46,5 +47,7 @@ | |||
46 | #define KEYCTL_INSTANTIATE 12 /* instantiate a partially constructed key */ | 47 | #define KEYCTL_INSTANTIATE 12 /* instantiate a partially constructed key */ |
47 | #define KEYCTL_NEGATE 13 /* negate a partially constructed key */ | 48 | #define KEYCTL_NEGATE 13 /* negate a partially constructed key */ |
48 | #define KEYCTL_SET_REQKEY_KEYRING 14 /* set default request-key keyring */ | 49 | #define KEYCTL_SET_REQKEY_KEYRING 14 /* set default request-key keyring */ |
50 | #define KEYCTL_SET_TIMEOUT 15 /* set key timeout */ | ||
51 | #define KEYCTL_ASSUME_AUTHORITY 16 /* assume request_key() authorisation */ | ||
49 | 52 | ||
50 | #endif /* _LINUX_KEYCTL_H */ | 53 | #endif /* _LINUX_KEYCTL_H */ |
diff --git a/include/linux/memory.h b/include/linux/memory.h index dc4081b6f161..e251dc43d0f5 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -70,21 +70,15 @@ static inline void unregister_memory_notifier(struct notifier_block *nb) | |||
70 | { | 70 | { |
71 | } | 71 | } |
72 | #else | 72 | #else |
73 | extern int register_memory(struct memory_block *, struct mem_section *section, struct node *); | ||
74 | extern int register_new_memory(struct mem_section *); | 73 | extern int register_new_memory(struct mem_section *); |
75 | extern int unregister_memory_section(struct mem_section *); | 74 | extern int unregister_memory_section(struct mem_section *); |
76 | extern int memory_dev_init(void); | 75 | extern int memory_dev_init(void); |
77 | extern int register_memory_notifier(struct notifier_block *nb); | 76 | extern int remove_memory_block(unsigned long, struct mem_section *, int); |
78 | extern void unregister_memory_notifier(struct notifier_block *nb); | ||
79 | 77 | ||
80 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) | 78 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) |
81 | 79 | ||
82 | extern int invalidate_phys_mapping(unsigned long, unsigned long); | ||
83 | struct notifier_block; | 80 | struct notifier_block; |
84 | 81 | ||
85 | extern int register_memory_notifier(struct notifier_block *nb); | ||
86 | extern void unregister_memory_notifier(struct notifier_block *nb); | ||
87 | |||
88 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 82 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
89 | 83 | ||
90 | #define hotplug_memory_notifier(fn, pri) { \ | 84 | #define hotplug_memory_notifier(fn, pri) { \ |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index ed00b278cb93..c7ac77e873b3 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -22,6 +22,9 @@ | |||
22 | 22 | ||
23 | /* Flags for mbind */ | 23 | /* Flags for mbind */ |
24 | #define MPOL_MF_STRICT (1<<0) /* Verify existing pages in the mapping */ | 24 | #define MPOL_MF_STRICT (1<<0) /* Verify existing pages in the mapping */ |
25 | #define MPOL_MF_MOVE (1<<1) /* Move pages owned by this process to conform to mapping */ | ||
26 | #define MPOL_MF_MOVE_ALL (1<<2) /* Move every page to conform to mapping */ | ||
27 | #define MPOL_MF_INTERNAL (1<<3) /* Internal flags start here */ | ||
25 | 28 | ||
26 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
27 | 30 | ||
@@ -65,6 +68,7 @@ struct mempolicy { | |||
65 | nodemask_t nodes; /* interleave */ | 68 | nodemask_t nodes; /* interleave */ |
66 | /* undefined for default */ | 69 | /* undefined for default */ |
67 | } v; | 70 | } v; |
71 | nodemask_t cpuset_mems_allowed; /* mempolicy relative to these nodes */ | ||
68 | }; | 72 | }; |
69 | 73 | ||
70 | /* | 74 | /* |
@@ -141,12 +145,21 @@ void mpol_free_shared_policy(struct shared_policy *p); | |||
141 | struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, | 145 | struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, |
142 | unsigned long idx); | 146 | unsigned long idx); |
143 | 147 | ||
144 | struct mempolicy *get_vma_policy(struct task_struct *task, | ||
145 | struct vm_area_struct *vma, unsigned long addr); | ||
146 | |||
147 | extern void numa_default_policy(void); | 148 | extern void numa_default_policy(void); |
148 | extern void numa_policy_init(void); | 149 | extern void numa_policy_init(void); |
149 | extern void numa_policy_rebind(const nodemask_t *old, const nodemask_t *new); | 150 | extern void mpol_rebind_policy(struct mempolicy *pol, const nodemask_t *new); |
151 | extern void mpol_rebind_task(struct task_struct *tsk, | ||
152 | const nodemask_t *new); | ||
153 | extern void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new); | ||
154 | #define set_cpuset_being_rebound(x) (cpuset_being_rebound = (x)) | ||
155 | |||
156 | #ifdef CONFIG_CPUSET | ||
157 | #define current_cpuset_is_being_rebound() \ | ||
158 | (cpuset_being_rebound == current->cpuset) | ||
159 | #else | ||
160 | #define current_cpuset_is_being_rebound() 0 | ||
161 | #endif | ||
162 | |||
150 | extern struct mempolicy default_policy; | 163 | extern struct mempolicy default_policy; |
151 | extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, | 164 | extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, |
152 | unsigned long addr); | 165 | unsigned long addr); |
@@ -159,6 +172,11 @@ static inline void check_highest_zone(int k) | |||
159 | policy_zone = k; | 172 | policy_zone = k; |
160 | } | 173 | } |
161 | 174 | ||
175 | int do_migrate_pages(struct mm_struct *mm, | ||
176 | const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags); | ||
177 | |||
178 | extern void *cpuset_being_rebound; /* Trigger mpol_copy vma rebind */ | ||
179 | |||
162 | #else | 180 | #else |
163 | 181 | ||
164 | struct mempolicy {}; | 182 | struct mempolicy {}; |
@@ -218,17 +236,35 @@ static inline void numa_default_policy(void) | |||
218 | { | 236 | { |
219 | } | 237 | } |
220 | 238 | ||
221 | static inline void numa_policy_rebind(const nodemask_t *old, | 239 | static inline void mpol_rebind_policy(struct mempolicy *pol, |
222 | const nodemask_t *new) | 240 | const nodemask_t *new) |
223 | { | 241 | { |
224 | } | 242 | } |
225 | 243 | ||
244 | static inline void mpol_rebind_task(struct task_struct *tsk, | ||
245 | const nodemask_t *new) | ||
246 | { | ||
247 | } | ||
248 | |||
249 | static inline void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new) | ||
250 | { | ||
251 | } | ||
252 | |||
253 | #define set_cpuset_being_rebound(x) do {} while (0) | ||
254 | |||
226 | static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, | 255 | static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, |
227 | unsigned long addr) | 256 | unsigned long addr) |
228 | { | 257 | { |
229 | return NODE_DATA(0)->node_zonelists + gfp_zone(GFP_HIGHUSER); | 258 | return NODE_DATA(0)->node_zonelists + gfp_zone(GFP_HIGHUSER); |
230 | } | 259 | } |
231 | 260 | ||
261 | static inline int do_migrate_pages(struct mm_struct *mm, | ||
262 | const nodemask_t *from_nodes, | ||
263 | const nodemask_t *to_nodes, int flags) | ||
264 | { | ||
265 | return 0; | ||
266 | } | ||
267 | |||
232 | static inline void check_highest_zone(int k) | 268 | static inline void check_highest_zone(int k) |
233 | { | 269 | { |
234 | } | 270 | } |
diff --git a/include/linux/mm.h b/include/linux/mm.h index bc01fff3aa01..df80e63903b5 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -223,24 +223,27 @@ struct page { | |||
223 | * & limit reverse map searches. | 223 | * & limit reverse map searches. |
224 | */ | 224 | */ |
225 | union { | 225 | union { |
226 | unsigned long private; /* Mapping-private opaque data: | 226 | struct { |
227 | * usually used for buffer_heads | 227 | unsigned long private; /* Mapping-private opaque data: |
228 | * if PagePrivate set; used for | 228 | * usually used for buffer_heads |
229 | * swp_entry_t if PageSwapCache | 229 | * if PagePrivate set; used for |
230 | * When page is free, this indicates | 230 | * swp_entry_t if PageSwapCache. |
231 | * order in the buddy system. | 231 | * When page is free, this |
232 | */ | 232 | * indicates order in the buddy |
233 | * system. | ||
234 | */ | ||
235 | struct address_space *mapping; /* If low bit clear, points to | ||
236 | * inode address_space, or NULL. | ||
237 | * If page mapped as anonymous | ||
238 | * memory, low bit is set, and | ||
239 | * it points to anon_vma object: | ||
240 | * see PAGE_MAPPING_ANON below. | ||
241 | */ | ||
242 | }; | ||
233 | #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS | 243 | #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS |
234 | spinlock_t ptl; | 244 | spinlock_t ptl; |
235 | #endif | 245 | #endif |
236 | } u; | 246 | }; |
237 | struct address_space *mapping; /* If low bit clear, points to | ||
238 | * inode address_space, or NULL. | ||
239 | * If page mapped as anonymous | ||
240 | * memory, low bit is set, and | ||
241 | * it points to anon_vma object: | ||
242 | * see PAGE_MAPPING_ANON below. | ||
243 | */ | ||
244 | pgoff_t index; /* Our offset within mapping. */ | 247 | pgoff_t index; /* Our offset within mapping. */ |
245 | struct list_head lru; /* Pageout list, eg. active_list | 248 | struct list_head lru; /* Pageout list, eg. active_list |
246 | * protected by zone->lru_lock ! | 249 | * protected by zone->lru_lock ! |
@@ -261,8 +264,8 @@ struct page { | |||
261 | #endif /* WANT_PAGE_VIRTUAL */ | 264 | #endif /* WANT_PAGE_VIRTUAL */ |
262 | }; | 265 | }; |
263 | 266 | ||
264 | #define page_private(page) ((page)->u.private) | 267 | #define page_private(page) ((page)->private) |
265 | #define set_page_private(page, v) ((page)->u.private = (v)) | 268 | #define set_page_private(page, v) ((page)->private = (v)) |
266 | 269 | ||
267 | /* | 270 | /* |
268 | * FIXME: take this include out, include page-flags.h in | 271 | * FIXME: take this include out, include page-flags.h in |
@@ -308,7 +311,7 @@ struct page { | |||
308 | */ | 311 | */ |
309 | #define get_page_testone(p) atomic_inc_and_test(&(p)->_count) | 312 | #define get_page_testone(p) atomic_inc_and_test(&(p)->_count) |
310 | 313 | ||
311 | #define set_page_count(p,v) atomic_set(&(p)->_count, v - 1) | 314 | #define set_page_count(p,v) atomic_set(&(p)->_count, (v) - 1) |
312 | #define __put_page(p) atomic_dec(&(p)->_count) | 315 | #define __put_page(p) atomic_dec(&(p)->_count) |
313 | 316 | ||
314 | extern void FASTCALL(__page_cache_release(struct page *)); | 317 | extern void FASTCALL(__page_cache_release(struct page *)); |
@@ -815,7 +818,7 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a | |||
815 | * overflow into the next struct page (as it might with DEBUG_SPINLOCK). | 818 | * overflow into the next struct page (as it might with DEBUG_SPINLOCK). |
816 | * When freeing, reset page->mapping so free_pages_check won't complain. | 819 | * When freeing, reset page->mapping so free_pages_check won't complain. |
817 | */ | 820 | */ |
818 | #define __pte_lockptr(page) &((page)->u.ptl) | 821 | #define __pte_lockptr(page) &((page)->ptl) |
819 | #define pte_lock_init(_page) do { \ | 822 | #define pte_lock_init(_page) do { \ |
820 | spin_lock_init(__pte_lockptr(_page)); \ | 823 | spin_lock_init(__pte_lockptr(_page)); \ |
821 | } while (0) | 824 | } while (0) |
@@ -1036,5 +1039,12 @@ int in_gate_area_no_task(unsigned long addr); | |||
1036 | /* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */ | 1039 | /* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */ |
1037 | #define OOM_DISABLE -17 | 1040 | #define OOM_DISABLE -17 |
1038 | 1041 | ||
1042 | int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *, | ||
1043 | void __user *, size_t *, loff_t *); | ||
1044 | int shrink_slab(unsigned long scanned, gfp_t gfp_mask, | ||
1045 | unsigned long lru_pages); | ||
1046 | void drop_pagecache(void); | ||
1047 | void drop_slab(void); | ||
1048 | |||
1039 | #endif /* __KERNEL__ */ | 1049 | #endif /* __KERNEL__ */ |
1040 | #endif /* _LINUX_MM_H */ | 1050 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 47762ca695a5..49cc68af01f8 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h | |||
@@ -38,3 +38,25 @@ del_page_from_lru(struct zone *zone, struct page *page) | |||
38 | zone->nr_inactive--; | 38 | zone->nr_inactive--; |
39 | } | 39 | } |
40 | } | 40 | } |
41 | |||
42 | /* | ||
43 | * Isolate one page from the LRU lists. | ||
44 | * | ||
45 | * - zone->lru_lock must be held | ||
46 | */ | ||
47 | static 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 c34f4a2c62f8..7e4ae6ab1977 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -38,7 +38,7 @@ struct pglist_data; | |||
38 | #if defined(CONFIG_SMP) | 38 | #if defined(CONFIG_SMP) |
39 | struct zone_padding { | 39 | struct zone_padding { |
40 | char x[0]; | 40 | char x[0]; |
41 | } ____cacheline_maxaligned_in_smp; | 41 | } ____cacheline_internodealigned_in_smp; |
42 | #define ZONE_PADDING(name) struct zone_padding name; | 42 | #define ZONE_PADDING(name) struct zone_padding name; |
43 | #else | 43 | #else |
44 | #define ZONE_PADDING(name) | 44 | #define ZONE_PADDING(name) |
@@ -233,7 +233,7 @@ struct zone { | |||
233 | * rarely used fields: | 233 | * rarely used fields: |
234 | */ | 234 | */ |
235 | char *name; | 235 | char *name; |
236 | } ____cacheline_maxaligned_in_smp; | 236 | } ____cacheline_internodealigned_in_smp; |
237 | 237 | ||
238 | 238 | ||
239 | /* | 239 | /* |
@@ -437,6 +437,8 @@ int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *, | |||
437 | extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1]; | 437 | extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1]; |
438 | int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *, | 438 | int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *, |
439 | void __user *, size_t *, loff_t *); | 439 | void __user *, size_t *, loff_t *); |
440 | int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *, | ||
441 | void __user *, size_t *, loff_t *); | ||
440 | 442 | ||
441 | #include <linux/topology.h> | 443 | #include <linux/topology.h> |
442 | /* Returns the number of the current Node. */ | 444 | /* Returns the number of the current Node. */ |
diff --git a/include/linux/mount.h b/include/linux/mount.h index dd4e83eba933..b98a709f1794 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -22,7 +22,8 @@ | |||
22 | #define MNT_NOEXEC 0x04 | 22 | #define MNT_NOEXEC 0x04 |
23 | #define MNT_SHARED 0x10 /* if the vfsmount is a shared mount */ | 23 | #define MNT_SHARED 0x10 /* if the vfsmount is a shared mount */ |
24 | #define MNT_UNBINDABLE 0x20 /* if the vfsmount is a unbindable mount */ | 24 | #define MNT_UNBINDABLE 0x20 /* if the vfsmount is a unbindable mount */ |
25 | #define MNT_PNODE_MASK 0x30 /* propogation flag mask */ | 25 | |
26 | #define MNT_PNODE_MASK (MNT_SHARED | MNT_UNBINDABLE) | ||
26 | 27 | ||
27 | struct vfsmount { | 28 | struct vfsmount { |
28 | struct list_head mnt_hash; | 29 | struct list_head mnt_hash; |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 941da5c016a0..e933e2a355ad 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -329,7 +329,8 @@ static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len) | |||
329 | extern void fat_cache_inval_inode(struct inode *inode); | 329 | extern void fat_cache_inval_inode(struct inode *inode); |
330 | extern int fat_get_cluster(struct inode *inode, int cluster, | 330 | extern int fat_get_cluster(struct inode *inode, int cluster, |
331 | int *fclus, int *dclus); | 331 | int *fclus, int *dclus); |
332 | extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys); | 332 | extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys, |
333 | unsigned long *mapped_blocks); | ||
333 | 334 | ||
334 | /* fat/dir.c */ | 335 | /* fat/dir.c */ |
335 | extern struct file_operations fat_dir_operations; | 336 | extern struct file_operations fat_dir_operations; |
diff --git a/include/linux/ncp.h b/include/linux/ncp.h index 99f77876b716..99f0adeeb3f3 100644 --- a/include/linux/ncp.h +++ b/include/linux/ncp.h | |||
@@ -20,29 +20,29 @@ | |||
20 | #define NCP_DEALLOC_SLOT_REQUEST (0x5555) | 20 | #define NCP_DEALLOC_SLOT_REQUEST (0x5555) |
21 | 21 | ||
22 | struct ncp_request_header { | 22 | struct ncp_request_header { |
23 | __u16 type __attribute__((packed)); | 23 | __u16 type; |
24 | __u8 sequence __attribute__((packed)); | 24 | __u8 sequence; |
25 | __u8 conn_low __attribute__((packed)); | 25 | __u8 conn_low; |
26 | __u8 task __attribute__((packed)); | 26 | __u8 task; |
27 | __u8 conn_high __attribute__((packed)); | 27 | __u8 conn_high; |
28 | __u8 function __attribute__((packed)); | 28 | __u8 function; |
29 | __u8 data[0] __attribute__((packed)); | 29 | __u8 data[0]; |
30 | }; | 30 | } __attribute__((packed)); |
31 | 31 | ||
32 | #define NCP_REPLY (0x3333) | 32 | #define NCP_REPLY (0x3333) |
33 | #define NCP_WATCHDOG (0x3E3E) | 33 | #define NCP_WATCHDOG (0x3E3E) |
34 | #define NCP_POSITIVE_ACK (0x9999) | 34 | #define NCP_POSITIVE_ACK (0x9999) |
35 | 35 | ||
36 | struct ncp_reply_header { | 36 | struct ncp_reply_header { |
37 | __u16 type __attribute__((packed)); | 37 | __u16 type; |
38 | __u8 sequence __attribute__((packed)); | 38 | __u8 sequence; |
39 | __u8 conn_low __attribute__((packed)); | 39 | __u8 conn_low; |
40 | __u8 task __attribute__((packed)); | 40 | __u8 task; |
41 | __u8 conn_high __attribute__((packed)); | 41 | __u8 conn_high; |
42 | __u8 completion_code __attribute__((packed)); | 42 | __u8 completion_code; |
43 | __u8 connection_state __attribute__((packed)); | 43 | __u8 connection_state; |
44 | __u8 data[0] __attribute__((packed)); | 44 | __u8 data[0]; |
45 | }; | 45 | } __attribute__((packed)); |
46 | 46 | ||
47 | #define NCP_VOLNAME_LEN (16) | 47 | #define NCP_VOLNAME_LEN (16) |
48 | #define NCP_NUMBER_OF_VOLUMES (256) | 48 | #define NCP_NUMBER_OF_VOLUMES (256) |
@@ -128,37 +128,37 @@ struct nw_nfs_info { | |||
128 | }; | 128 | }; |
129 | 129 | ||
130 | struct nw_info_struct { | 130 | struct nw_info_struct { |
131 | __u32 spaceAlloc __attribute__((packed)); | 131 | __u32 spaceAlloc; |
132 | __le32 attributes __attribute__((packed)); | 132 | __le32 attributes; |
133 | __u16 flags __attribute__((packed)); | 133 | __u16 flags; |
134 | __le32 dataStreamSize __attribute__((packed)); | 134 | __le32 dataStreamSize; |
135 | __le32 totalStreamSize __attribute__((packed)); | 135 | __le32 totalStreamSize; |
136 | __u16 numberOfStreams __attribute__((packed)); | 136 | __u16 numberOfStreams; |
137 | __le16 creationTime __attribute__((packed)); | 137 | __le16 creationTime; |
138 | __le16 creationDate __attribute__((packed)); | 138 | __le16 creationDate; |
139 | __u32 creatorID __attribute__((packed)); | 139 | __u32 creatorID; |
140 | __le16 modifyTime __attribute__((packed)); | 140 | __le16 modifyTime; |
141 | __le16 modifyDate __attribute__((packed)); | 141 | __le16 modifyDate; |
142 | __u32 modifierID __attribute__((packed)); | 142 | __u32 modifierID; |
143 | __le16 lastAccessDate __attribute__((packed)); | 143 | __le16 lastAccessDate; |
144 | __u16 archiveTime __attribute__((packed)); | 144 | __u16 archiveTime; |
145 | __u16 archiveDate __attribute__((packed)); | 145 | __u16 archiveDate; |
146 | __u32 archiverID __attribute__((packed)); | 146 | __u32 archiverID; |
147 | __u16 inheritedRightsMask __attribute__((packed)); | 147 | __u16 inheritedRightsMask; |
148 | __le32 dirEntNum __attribute__((packed)); | 148 | __le32 dirEntNum; |
149 | __le32 DosDirNum __attribute__((packed)); | 149 | __le32 DosDirNum; |
150 | __u32 volNumber __attribute__((packed)); | 150 | __u32 volNumber; |
151 | __u32 EADataSize __attribute__((packed)); | 151 | __u32 EADataSize; |
152 | __u32 EAKeyCount __attribute__((packed)); | 152 | __u32 EAKeyCount; |
153 | __u32 EAKeySize __attribute__((packed)); | 153 | __u32 EAKeySize; |
154 | __u32 NSCreator __attribute__((packed)); | 154 | __u32 NSCreator; |
155 | __u8 nameLen __attribute__((packed)); | 155 | __u8 nameLen; |
156 | __u8 entryName[256] __attribute__((packed)); | 156 | __u8 entryName[256]; |
157 | /* libncp may depend on there being nothing after entryName */ | 157 | /* libncp may depend on there being nothing after entryName */ |
158 | #ifdef __KERNEL__ | 158 | #ifdef __KERNEL__ |
159 | struct nw_nfs_info nfs; | 159 | struct nw_nfs_info nfs; |
160 | #endif | 160 | #endif |
161 | }; | 161 | } __attribute__((packed)); |
162 | 162 | ||
163 | /* modify mask - use with MODIFY_DOS_INFO structure */ | 163 | /* modify mask - use with MODIFY_DOS_INFO structure */ |
164 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) | 164 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) |
@@ -176,26 +176,26 @@ struct nw_info_struct { | |||
176 | #define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000)) | 176 | #define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000)) |
177 | 177 | ||
178 | struct nw_modify_dos_info { | 178 | struct nw_modify_dos_info { |
179 | __le32 attributes __attribute__((packed)); | 179 | __le32 attributes; |
180 | __le16 creationDate __attribute__((packed)); | 180 | __le16 creationDate; |
181 | __le16 creationTime __attribute__((packed)); | 181 | __le16 creationTime; |
182 | __u32 creatorID __attribute__((packed)); | 182 | __u32 creatorID; |
183 | __le16 modifyDate __attribute__((packed)); | 183 | __le16 modifyDate; |
184 | __le16 modifyTime __attribute__((packed)); | 184 | __le16 modifyTime; |
185 | __u32 modifierID __attribute__((packed)); | 185 | __u32 modifierID; |
186 | __u16 archiveDate __attribute__((packed)); | 186 | __u16 archiveDate; |
187 | __u16 archiveTime __attribute__((packed)); | 187 | __u16 archiveTime; |
188 | __u32 archiverID __attribute__((packed)); | 188 | __u32 archiverID; |
189 | __le16 lastAccessDate __attribute__((packed)); | 189 | __le16 lastAccessDate; |
190 | __u16 inheritanceGrantMask __attribute__((packed)); | 190 | __u16 inheritanceGrantMask; |
191 | __u16 inheritanceRevokeMask __attribute__((packed)); | 191 | __u16 inheritanceRevokeMask; |
192 | __u32 maximumSpace __attribute__((packed)); | 192 | __u32 maximumSpace; |
193 | }; | 193 | } __attribute__((packed)); |
194 | 194 | ||
195 | struct nw_search_sequence { | 195 | struct nw_search_sequence { |
196 | __u8 volNumber __attribute__((packed)); | 196 | __u8 volNumber; |
197 | __u32 dirBase __attribute__((packed)); | 197 | __u32 dirBase; |
198 | __u32 sequence __attribute__((packed)); | 198 | __u32 sequence; |
199 | }; | 199 | } __attribute__((packed)); |
200 | 200 | ||
201 | #endif /* _LINUX_NCP_H */ | 201 | #endif /* _LINUX_NCP_H */ |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index be365e70ee99..4cf6088625c1 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -168,6 +168,37 @@ void nf_log_packet(int pf, | |||
168 | const struct net_device *out, | 168 | const struct net_device *out, |
169 | struct nf_loginfo *li, | 169 | struct nf_loginfo *li, |
170 | const char *fmt, ...); | 170 | const char *fmt, ...); |
171 | |||
172 | int nf_hook_slow(int pf, unsigned int hook, struct sk_buff **pskb, | ||
173 | struct net_device *indev, struct net_device *outdev, | ||
174 | int (*okfn)(struct sk_buff *), int thresh); | ||
175 | |||
176 | /** | ||
177 | * nf_hook_thresh - call a netfilter hook | ||
178 | * | ||
179 | * Returns 1 if the hook has allowed the packet to pass. The function | ||
180 | * okfn must be invoked by the caller in this case. Any other return | ||
181 | * value indicates the packet has been consumed by the hook. | ||
182 | */ | ||
183 | static inline int nf_hook_thresh(int pf, unsigned int hook, | ||
184 | struct sk_buff **pskb, | ||
185 | struct net_device *indev, | ||
186 | struct net_device *outdev, | ||
187 | int (*okfn)(struct sk_buff *), int thresh) | ||
188 | { | ||
189 | #ifndef CONFIG_NETFILTER_DEBUG | ||
190 | if (list_empty(&nf_hooks[pf][hook])) | ||
191 | return 1; | ||
192 | #endif | ||
193 | return nf_hook_slow(pf, hook, pskb, indev, outdev, okfn, thresh); | ||
194 | } | ||
195 | |||
196 | static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | ||
197 | struct net_device *indev, struct net_device *outdev, | ||
198 | int (*okfn)(struct sk_buff *)) | ||
199 | { | ||
200 | return nf_hook_thresh(pf, hook, pskb, indev, outdev, okfn, INT_MIN); | ||
201 | } | ||
171 | 202 | ||
172 | /* Activate hook; either okfn or kfree_skb called, unless a hook | 203 | /* Activate hook; either okfn or kfree_skb called, unless a hook |
173 | returns NF_STOLEN (in which case, it's up to the hook to deal with | 204 | returns NF_STOLEN (in which case, it's up to the hook to deal with |
@@ -188,35 +219,17 @@ void nf_log_packet(int pf, | |||
188 | 219 | ||
189 | /* This is gross, but inline doesn't cut it for avoiding the function | 220 | /* This is gross, but inline doesn't cut it for avoiding the function |
190 | call in fast path: gcc doesn't inline (needs value tracking?). --RR */ | 221 | call in fast path: gcc doesn't inline (needs value tracking?). --RR */ |
191 | #ifdef CONFIG_NETFILTER_DEBUG | 222 | |
192 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ | 223 | /* HX: It's slightly less gross now. */ |
193 | ({int __ret; \ | 224 | |
194 | if ((__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, INT_MIN)) == 1) \ | ||
195 | __ret = (okfn)(skb); \ | ||
196 | __ret;}) | ||
197 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ | ||
198 | ({int __ret; \ | ||
199 | if ((__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1) \ | ||
200 | __ret = (okfn)(skb); \ | ||
201 | __ret;}) | ||
202 | #else | ||
203 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ | ||
204 | ({int __ret; \ | ||
205 | if (list_empty(&nf_hooks[pf][hook]) || \ | ||
206 | (__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, INT_MIN)) == 1) \ | ||
207 | __ret = (okfn)(skb); \ | ||
208 | __ret;}) | ||
209 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ | 225 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ |
210 | ({int __ret; \ | 226 | ({int __ret; \ |
211 | if (list_empty(&nf_hooks[pf][hook]) || \ | 227 | if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1)\ |
212 | (__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1) \ | ||
213 | __ret = (okfn)(skb); \ | 228 | __ret = (okfn)(skb); \ |
214 | __ret;}) | 229 | __ret;}) |
215 | #endif | ||
216 | 230 | ||
217 | int nf_hook_slow(int pf, unsigned int hook, struct sk_buff **pskb, | 231 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ |
218 | struct net_device *indev, struct net_device *outdev, | 232 | NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, INT_MIN) |
219 | int (*okfn)(struct sk_buff *), int thresh); | ||
220 | 233 | ||
221 | /* Call setsockopt() */ | 234 | /* Call setsockopt() */ |
222 | int nf_setsockopt(struct sock *sk, int pf, int optval, char __user *opt, | 235 | int nf_setsockopt(struct sock *sk, int pf, int optval, char __user *opt, |
@@ -261,6 +274,20 @@ struct nf_queue_rerouter { | |||
261 | extern int nf_register_queue_rerouter(int pf, struct nf_queue_rerouter *rer); | 274 | extern int nf_register_queue_rerouter(int pf, struct nf_queue_rerouter *rer); |
262 | extern int nf_unregister_queue_rerouter(int pf); | 275 | extern int nf_unregister_queue_rerouter(int pf); |
263 | 276 | ||
277 | #include <net/flow.h> | ||
278 | extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); | ||
279 | |||
280 | static inline void | ||
281 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) | ||
282 | { | ||
283 | #ifdef CONFIG_IP_NF_NAT_NEEDED | ||
284 | void (*decodefn)(struct sk_buff *, struct flowi *); | ||
285 | |||
286 | if (family == AF_INET && (decodefn = ip_nat_decode_session) != NULL) | ||
287 | decodefn(skb, fl); | ||
288 | #endif | ||
289 | } | ||
290 | |||
264 | #ifdef CONFIG_PROC_FS | 291 | #ifdef CONFIG_PROC_FS |
265 | #include <linux/proc_fs.h> | 292 | #include <linux/proc_fs.h> |
266 | extern struct proc_dir_entry *proc_net_netfilter; | 293 | extern struct proc_dir_entry *proc_net_netfilter; |
@@ -268,7 +295,24 @@ extern struct proc_dir_entry *proc_net_netfilter; | |||
268 | 295 | ||
269 | #else /* !CONFIG_NETFILTER */ | 296 | #else /* !CONFIG_NETFILTER */ |
270 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) | 297 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) |
298 | static inline int nf_hook_thresh(int pf, unsigned int hook, | ||
299 | struct sk_buff **pskb, | ||
300 | struct net_device *indev, | ||
301 | struct net_device *outdev, | ||
302 | int (*okfn)(struct sk_buff *), int thresh) | ||
303 | { | ||
304 | return okfn(*pskb); | ||
305 | } | ||
306 | static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | ||
307 | struct net_device *indev, struct net_device *outdev, | ||
308 | int (*okfn)(struct sk_buff *)) | ||
309 | { | ||
310 | return okfn(*pskb); | ||
311 | } | ||
271 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} | 312 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} |
313 | struct flowi; | ||
314 | static inline void | ||
315 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) {} | ||
272 | #endif /*CONFIG_NETFILTER*/ | 316 | #endif /*CONFIG_NETFILTER*/ |
273 | 317 | ||
274 | #endif /*__KERNEL__*/ | 318 | #endif /*__KERNEL__*/ |
diff --git a/include/linux/netfilter_ipv4/ipt_policy.h b/include/linux/netfilter_ipv4/ipt_policy.h new file mode 100644 index 000000000000..7fd1bec453f1 --- /dev/null +++ b/include/linux/netfilter_ipv4/ipt_policy.h | |||
@@ -0,0 +1,52 @@ | |||
1 | #ifndef _IPT_POLICY_H | ||
2 | #define _IPT_POLICY_H | ||
3 | |||
4 | #define IPT_POLICY_MAX_ELEM 4 | ||
5 | |||
6 | enum ipt_policy_flags | ||
7 | { | ||
8 | IPT_POLICY_MATCH_IN = 0x1, | ||
9 | IPT_POLICY_MATCH_OUT = 0x2, | ||
10 | IPT_POLICY_MATCH_NONE = 0x4, | ||
11 | IPT_POLICY_MATCH_STRICT = 0x8, | ||
12 | }; | ||
13 | |||
14 | enum ipt_policy_modes | ||
15 | { | ||
16 | IPT_POLICY_MODE_TRANSPORT, | ||
17 | IPT_POLICY_MODE_TUNNEL | ||
18 | }; | ||
19 | |||
20 | struct ipt_policy_spec | ||
21 | { | ||
22 | u_int8_t saddr:1, | ||
23 | daddr:1, | ||
24 | proto:1, | ||
25 | mode:1, | ||
26 | spi:1, | ||
27 | reqid:1; | ||
28 | }; | ||
29 | |||
30 | struct ipt_policy_elem | ||
31 | { | ||
32 | u_int32_t saddr; | ||
33 | u_int32_t smask; | ||
34 | u_int32_t daddr; | ||
35 | u_int32_t dmask; | ||
36 | u_int32_t spi; | ||
37 | u_int32_t reqid; | ||
38 | u_int8_t proto; | ||
39 | u_int8_t mode; | ||
40 | |||
41 | struct ipt_policy_spec match; | ||
42 | struct ipt_policy_spec invert; | ||
43 | }; | ||
44 | |||
45 | struct ipt_policy_info | ||
46 | { | ||
47 | struct ipt_policy_elem pol[IPT_POLICY_MAX_ELEM]; | ||
48 | u_int16_t flags; | ||
49 | u_int16_t len; | ||
50 | }; | ||
51 | |||
52 | #endif /* _IPT_POLICY_H */ | ||
diff --git a/include/linux/netfilter_ipv6/ip6t_policy.h b/include/linux/netfilter_ipv6/ip6t_policy.h new file mode 100644 index 000000000000..5a93afcd2ff1 --- /dev/null +++ b/include/linux/netfilter_ipv6/ip6t_policy.h | |||
@@ -0,0 +1,52 @@ | |||
1 | #ifndef _IP6T_POLICY_H | ||
2 | #define _IP6T_POLICY_H | ||
3 | |||
4 | #define IP6T_POLICY_MAX_ELEM 4 | ||
5 | |||
6 | enum ip6t_policy_flags | ||
7 | { | ||
8 | IP6T_POLICY_MATCH_IN = 0x1, | ||
9 | IP6T_POLICY_MATCH_OUT = 0x2, | ||
10 | IP6T_POLICY_MATCH_NONE = 0x4, | ||
11 | IP6T_POLICY_MATCH_STRICT = 0x8, | ||
12 | }; | ||
13 | |||
14 | enum ip6t_policy_modes | ||
15 | { | ||
16 | IP6T_POLICY_MODE_TRANSPORT, | ||
17 | IP6T_POLICY_MODE_TUNNEL | ||
18 | }; | ||
19 | |||
20 | struct ip6t_policy_spec | ||
21 | { | ||
22 | u_int8_t saddr:1, | ||
23 | daddr:1, | ||
24 | proto:1, | ||
25 | mode:1, | ||
26 | spi:1, | ||
27 | reqid:1; | ||
28 | }; | ||
29 | |||
30 | struct ip6t_policy_elem | ||
31 | { | ||
32 | struct in6_addr saddr; | ||
33 | struct in6_addr smask; | ||
34 | struct in6_addr daddr; | ||
35 | struct in6_addr dmask; | ||
36 | u_int32_t spi; | ||
37 | u_int32_t reqid; | ||
38 | u_int8_t proto; | ||
39 | u_int8_t mode; | ||
40 | |||
41 | struct ip6t_policy_spec match; | ||
42 | struct ip6t_policy_spec invert; | ||
43 | }; | ||
44 | |||
45 | struct ip6t_policy_info | ||
46 | { | ||
47 | struct ip6t_policy_elem pol[IP6T_POLICY_MAX_ELEM]; | ||
48 | u_int16_t flags; | ||
49 | u_int16_t len; | ||
50 | }; | ||
51 | |||
52 | #endif /* _IP6T_POLICY_H */ | ||
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index def32c5715be..8eb7fa76c1d0 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h | |||
@@ -5,6 +5,9 @@ | |||
5 | * pages. A pagevec is a multipage container which is used for that. | 5 | * pages. A pagevec is a multipage container which is used for that. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef _LINUX_PAGEVEC_H | ||
9 | #define _LINUX_PAGEVEC_H | ||
10 | |||
8 | /* 14 pointers + two long's align the pagevec structure to a power of two */ | 11 | /* 14 pointers + two long's align the pagevec structure to a power of two */ |
9 | #define PAGEVEC_SIZE 14 | 12 | #define PAGEVEC_SIZE 14 |
10 | 13 | ||
@@ -83,3 +86,5 @@ static inline void pagevec_lru_add(struct pagevec *pvec) | |||
83 | if (pagevec_count(pvec)) | 86 | if (pagevec_count(pvec)) |
84 | __pagevec_lru_add(pvec); | 87 | __pagevec_lru_add(pvec); |
85 | } | 88 | } |
89 | |||
90 | #endif /* _LINUX_PAGEVEC_H */ | ||
diff --git a/include/linux/parport.h b/include/linux/parport.h index f7ff0b0c4031..f67f838a3a1f 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h | |||
@@ -236,12 +236,14 @@ struct pardevice { | |||
236 | 236 | ||
237 | /* IEEE1284 information */ | 237 | /* IEEE1284 information */ |
238 | 238 | ||
239 | /* IEEE1284 phases */ | 239 | /* IEEE1284 phases. These are exposed to userland through ppdev IOCTL |
240 | * PP[GS]ETPHASE, so do not change existing values. */ | ||
240 | enum ieee1284_phase { | 241 | enum ieee1284_phase { |
241 | IEEE1284_PH_FWD_DATA, | 242 | IEEE1284_PH_FWD_DATA, |
242 | IEEE1284_PH_FWD_IDLE, | 243 | IEEE1284_PH_FWD_IDLE, |
243 | IEEE1284_PH_TERMINATE, | 244 | IEEE1284_PH_TERMINATE, |
244 | IEEE1284_PH_NEGOTIATION, | 245 | IEEE1284_PH_NEGOTIATION, |
246 | IEEE1284_PH_HBUSY_DNA, | ||
245 | IEEE1284_PH_REV_IDLE, | 247 | IEEE1284_PH_REV_IDLE, |
246 | IEEE1284_PH_HBUSY_DAVAIL, | 248 | IEEE1284_PH_HBUSY_DAVAIL, |
247 | IEEE1284_PH_REV_DATA, | 249 | IEEE1284_PH_REV_DATA, |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index fb8d2d24e4bb..cb9039a21f2a 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | struct percpu_data { | 20 | struct percpu_data { |
21 | void *ptrs[NR_CPUS]; | 21 | void *ptrs[NR_CPUS]; |
22 | void *blkp; | ||
23 | }; | 22 | }; |
24 | 23 | ||
25 | /* | 24 | /* |
@@ -33,14 +32,14 @@ struct percpu_data { | |||
33 | (__typeof__(ptr))__p->ptrs[(cpu)]; \ | 32 | (__typeof__(ptr))__p->ptrs[(cpu)]; \ |
34 | }) | 33 | }) |
35 | 34 | ||
36 | extern void *__alloc_percpu(size_t size, size_t align); | 35 | extern void *__alloc_percpu(size_t size); |
37 | extern void free_percpu(const void *); | 36 | extern void free_percpu(const void *); |
38 | 37 | ||
39 | #else /* CONFIG_SMP */ | 38 | #else /* CONFIG_SMP */ |
40 | 39 | ||
41 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 40 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
42 | 41 | ||
43 | static inline void *__alloc_percpu(size_t size, size_t align) | 42 | static inline void *__alloc_percpu(size_t size) |
44 | { | 43 | { |
45 | void *ret = kmalloc(size, GFP_KERNEL); | 44 | void *ret = kmalloc(size, GFP_KERNEL); |
46 | if (ret) | 45 | if (ret) |
@@ -55,7 +54,6 @@ static inline void free_percpu(const void *ptr) | |||
55 | #endif /* CONFIG_SMP */ | 54 | #endif /* CONFIG_SMP */ |
56 | 55 | ||
57 | /* Simple wrapper for the common case: zeros memory. */ | 56 | /* Simple wrapper for the common case: zeros memory. */ |
58 | #define alloc_percpu(type) \ | 57 | #define alloc_percpu(type) ((type *)(__alloc_percpu(sizeof(type)))) |
59 | ((type *)(__alloc_percpu(sizeof(type), __alignof__(type)))) | ||
60 | 58 | ||
61 | #endif /* __LINUX_PERCPU_H */ | 59 | #endif /* __LINUX_PERCPU_H */ |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index b2b3dba1298d..9d5cd106b344 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -20,8 +20,6 @@ | |||
20 | #define PTRACE_DETACH 0x11 | 20 | #define PTRACE_DETACH 0x11 |
21 | 21 | ||
22 | #define PTRACE_SYSCALL 24 | 22 | #define PTRACE_SYSCALL 24 |
23 | #define PTRACE_SYSEMU 31 | ||
24 | #define PTRACE_SYSEMU_SINGLESTEP 32 | ||
25 | 23 | ||
26 | /* 0x4200-0x4300 are reserved for architecture-independent additions. */ | 24 | /* 0x4200-0x4300 are reserved for architecture-independent additions. */ |
27 | #define PTRACE_SETOPTIONS 0x4200 | 25 | #define PTRACE_SETOPTIONS 0x4200 |
@@ -80,6 +78,8 @@ | |||
80 | 78 | ||
81 | 79 | ||
82 | extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); | 80 | extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); |
81 | extern struct task_struct *ptrace_get_task_struct(pid_t pid); | ||
82 | extern int ptrace_traceme(void); | ||
83 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); | 83 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); |
84 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); | 84 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); |
85 | extern int ptrace_attach(struct task_struct *tsk); | 85 | extern int ptrace_attach(struct task_struct *tsk); |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index 36e5d269612f..c57ff2fcb30a 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #ifndef _LINUX_RADIX_TREE_H | 19 | #ifndef _LINUX_RADIX_TREE_H |
20 | #define _LINUX_RADIX_TREE_H | 20 | #define _LINUX_RADIX_TREE_H |
21 | 21 | ||
22 | #include <linux/sched.h> | ||
22 | #include <linux/preempt.h> | 23 | #include <linux/preempt.h> |
23 | #include <linux/types.h> | 24 | #include <linux/types.h> |
24 | 25 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index a471f3bb713e..51747cd88d1a 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -65,7 +65,7 @@ struct rcu_ctrlblk { | |||
65 | long cur; /* Current batch number. */ | 65 | long cur; /* Current batch number. */ |
66 | long completed; /* Number of the last completed batch */ | 66 | long completed; /* Number of the last completed batch */ |
67 | int next_pending; /* Is the next batch already waiting? */ | 67 | int next_pending; /* Is the next batch already waiting? */ |
68 | } ____cacheline_maxaligned_in_smp; | 68 | } ____cacheline_internodealigned_in_smp; |
69 | 69 | ||
70 | /* Is batch a before batch b ? */ | 70 | /* Is batch a before batch b ? */ |
71 | static inline int rcu_batch_before(long a, long b) | 71 | static inline int rcu_batch_before(long a, long b) |
diff --git a/include/linux/rcuref.h b/include/linux/rcuref.h deleted file mode 100644 index e1adbba14b67..000000000000 --- a/include/linux/rcuref.h +++ /dev/null | |||
@@ -1,220 +0,0 @@ | |||
1 | /* | ||
2 | * rcuref.h | ||
3 | * | ||
4 | * Reference counting for elements of lists/arrays protected by | ||
5 | * RCU. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
20 | * | ||
21 | * Copyright (C) IBM Corporation, 2005 | ||
22 | * | ||
23 | * Author: Dipankar Sarma <dipankar@in.ibm.com> | ||
24 | * Ravikiran Thirumalai <kiran_th@gmail.com> | ||
25 | * | ||
26 | * See Documentation/RCU/rcuref.txt for detailed user guide. | ||
27 | * | ||
28 | */ | ||
29 | |||
30 | #ifndef _RCUREF_H_ | ||
31 | #define _RCUREF_H_ | ||
32 | |||
33 | #ifdef __KERNEL__ | ||
34 | |||
35 | #include <linux/types.h> | ||
36 | #include <linux/interrupt.h> | ||
37 | #include <linux/spinlock.h> | ||
38 | #include <asm/atomic.h> | ||
39 | |||
40 | /* | ||
41 | * These APIs work on traditional atomic_t counters used in the | ||
42 | * kernel for reference counting. Under special circumstances | ||
43 | * where a lock-free get() operation races with a put() operation | ||
44 | * these APIs can be used. See Documentation/RCU/rcuref.txt. | ||
45 | */ | ||
46 | |||
47 | #ifdef __HAVE_ARCH_CMPXCHG | ||
48 | |||
49 | /** | ||
50 | * rcuref_inc - increment refcount for object. | ||
51 | * @rcuref: reference counter in the object in question. | ||
52 | * | ||
53 | * This should be used only for objects where we use RCU and | ||
54 | * use the rcuref_inc_lf() api to acquire a reference | ||
55 | * in a lock-free reader-side critical section. | ||
56 | */ | ||
57 | static inline void rcuref_inc(atomic_t *rcuref) | ||
58 | { | ||
59 | atomic_inc(rcuref); | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * rcuref_dec - decrement refcount for object. | ||
64 | * @rcuref: reference counter in the object in question. | ||
65 | * | ||
66 | * This should be used only for objects where we use RCU and | ||
67 | * use the rcuref_inc_lf() api to acquire a reference | ||
68 | * in a lock-free reader-side critical section. | ||
69 | */ | ||
70 | static inline void rcuref_dec(atomic_t *rcuref) | ||
71 | { | ||
72 | atomic_dec(rcuref); | ||
73 | } | ||
74 | |||
75 | /** | ||
76 | * rcuref_dec_and_test - decrement refcount for object and test | ||
77 | * @rcuref: reference counter in the object. | ||
78 | * @release: pointer to the function that will clean up the object | ||
79 | * when the last reference to the object is released. | ||
80 | * This pointer is required. | ||
81 | * | ||
82 | * Decrement the refcount, and if 0, return 1. Else return 0. | ||
83 | * | ||
84 | * This should be used only for objects where we use RCU and | ||
85 | * use the rcuref_inc_lf() api to acquire a reference | ||
86 | * in a lock-free reader-side critical section. | ||
87 | */ | ||
88 | static inline int rcuref_dec_and_test(atomic_t *rcuref) | ||
89 | { | ||
90 | return atomic_dec_and_test(rcuref); | ||
91 | } | ||
92 | |||
93 | /* | ||
94 | * cmpxchg is needed on UP too, if deletions to the list/array can happen | ||
95 | * in interrupt context. | ||
96 | */ | ||
97 | |||
98 | /** | ||
99 | * rcuref_inc_lf - Take reference to an object in a read-side | ||
100 | * critical section protected by RCU. | ||
101 | * @rcuref: reference counter in the object in question. | ||
102 | * | ||
103 | * Try and increment the refcount by 1. The increment might fail if | ||
104 | * the reference counter has been through a 1 to 0 transition and | ||
105 | * is no longer part of the lock-free list. | ||
106 | * Returns non-zero on successful increment and zero otherwise. | ||
107 | */ | ||
108 | static inline int rcuref_inc_lf(atomic_t *rcuref) | ||
109 | { | ||
110 | int c, old; | ||
111 | c = atomic_read(rcuref); | ||
112 | while (c && (old = cmpxchg(&rcuref->counter, c, c + 1)) != c) | ||
113 | c = old; | ||
114 | return c; | ||
115 | } | ||
116 | |||
117 | #else /* !__HAVE_ARCH_CMPXCHG */ | ||
118 | |||
119 | extern spinlock_t __rcuref_hash[]; | ||
120 | |||
121 | /* | ||
122 | * Use a hash table of locks to protect the reference count | ||
123 | * since cmpxchg is not available in this arch. | ||
124 | */ | ||
125 | #ifdef CONFIG_SMP | ||
126 | #define RCUREF_HASH_SIZE 4 | ||
127 | #define RCUREF_HASH(k) \ | ||
128 | (&__rcuref_hash[(((unsigned long)k)>>8) & (RCUREF_HASH_SIZE-1)]) | ||
129 | #else | ||
130 | #define RCUREF_HASH_SIZE 1 | ||
131 | #define RCUREF_HASH(k) &__rcuref_hash[0] | ||
132 | #endif /* CONFIG_SMP */ | ||
133 | |||
134 | /** | ||
135 | * rcuref_inc - increment refcount for object. | ||
136 | * @rcuref: reference counter in the object in question. | ||
137 | * | ||
138 | * This should be used only for objects where we use RCU and | ||
139 | * use the rcuref_inc_lf() api to acquire a reference in a lock-free | ||
140 | * reader-side critical section. | ||
141 | */ | ||
142 | static inline void rcuref_inc(atomic_t *rcuref) | ||
143 | { | ||
144 | unsigned long flags; | ||
145 | spin_lock_irqsave(RCUREF_HASH(rcuref), flags); | ||
146 | rcuref->counter += 1; | ||
147 | spin_unlock_irqrestore(RCUREF_HASH(rcuref), flags); | ||
148 | } | ||
149 | |||
150 | /** | ||
151 | * rcuref_dec - decrement refcount for object. | ||
152 | * @rcuref: reference counter in the object in question. | ||
153 | * | ||
154 | * This should be used only for objects where we use RCU and | ||
155 | * use the rcuref_inc_lf() api to acquire a reference in a lock-free | ||
156 | * reader-side critical section. | ||
157 | */ | ||
158 | static inline void rcuref_dec(atomic_t *rcuref) | ||
159 | { | ||
160 | unsigned long flags; | ||
161 | spin_lock_irqsave(RCUREF_HASH(rcuref), flags); | ||
162 | rcuref->counter -= 1; | ||
163 | spin_unlock_irqrestore(RCUREF_HASH(rcuref), flags); | ||
164 | } | ||
165 | |||
166 | /** | ||
167 | * rcuref_dec_and_test - decrement refcount for object and test | ||
168 | * @rcuref: reference counter in the object. | ||
169 | * @release: pointer to the function that will clean up the object | ||
170 | * when the last reference to the object is released. | ||
171 | * This pointer is required. | ||
172 | * | ||
173 | * Decrement the refcount, and if 0, return 1. Else return 0. | ||
174 | * | ||
175 | * This should be used only for objects where we use RCU and | ||
176 | * use the rcuref_inc_lf() api to acquire a reference in a lock-free | ||
177 | * reader-side critical section. | ||
178 | */ | ||
179 | static inline int rcuref_dec_and_test(atomic_t *rcuref) | ||
180 | { | ||
181 | unsigned long flags; | ||
182 | spin_lock_irqsave(RCUREF_HASH(rcuref), flags); | ||
183 | rcuref->counter--; | ||
184 | if (!rcuref->counter) { | ||
185 | spin_unlock_irqrestore(RCUREF_HASH(rcuref), flags); | ||
186 | return 1; | ||
187 | } else { | ||
188 | spin_unlock_irqrestore(RCUREF_HASH(rcuref), flags); | ||
189 | return 0; | ||
190 | } | ||
191 | } | ||
192 | |||
193 | /** | ||
194 | * rcuref_inc_lf - Take reference to an object of a lock-free collection | ||
195 | * by traversing a lock-free list/array. | ||
196 | * @rcuref: reference counter in the object in question. | ||
197 | * | ||
198 | * Try and increment the refcount by 1. The increment might fail if | ||
199 | * the reference counter has been through a 1 to 0 transition and | ||
200 | * object is no longer part of the lock-free list. | ||
201 | * Returns non-zero on successful increment and zero otherwise. | ||
202 | */ | ||
203 | static inline int rcuref_inc_lf(atomic_t *rcuref) | ||
204 | { | ||
205 | int ret; | ||
206 | unsigned long flags; | ||
207 | spin_lock_irqsave(RCUREF_HASH(rcuref), flags); | ||
208 | if (rcuref->counter) | ||
209 | ret = rcuref->counter++; | ||
210 | else | ||
211 | ret = 0; | ||
212 | spin_unlock_irqrestore(RCUREF_HASH(rcuref), flags); | ||
213 | return ret; | ||
214 | } | ||
215 | |||
216 | |||
217 | #endif /* !__HAVE_ARCH_CMPXCHG */ | ||
218 | |||
219 | #endif /* __KERNEL__ */ | ||
220 | #endif /* _RCUREF_H_ */ | ||
diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h index fb7e80737325..7342e66247fb 100644 --- a/include/linux/relayfs_fs.h +++ b/include/linux/relayfs_fs.h | |||
@@ -65,20 +65,6 @@ struct rchan | |||
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * Relayfs inode | ||
69 | */ | ||
70 | struct relayfs_inode_info | ||
71 | { | ||
72 | struct inode vfs_inode; | ||
73 | struct rchan_buf *buf; | ||
74 | }; | ||
75 | |||
76 | static inline struct relayfs_inode_info *RELAYFS_I(struct inode *inode) | ||
77 | { | ||
78 | return container_of(inode, struct relayfs_inode_info, vfs_inode); | ||
79 | } | ||
80 | |||
81 | /* | ||
82 | * Relay channel client callbacks | 68 | * Relay channel client callbacks |
83 | */ | 69 | */ |
84 | struct rchan_callbacks | 70 | struct rchan_callbacks |
@@ -124,6 +110,46 @@ struct rchan_callbacks | |||
124 | */ | 110 | */ |
125 | void (*buf_unmapped)(struct rchan_buf *buf, | 111 | void (*buf_unmapped)(struct rchan_buf *buf, |
126 | struct file *filp); | 112 | struct file *filp); |
113 | /* | ||
114 | * create_buf_file - create file to represent a relayfs channel buffer | ||
115 | * @filename: the name of the file to create | ||
116 | * @parent: the parent of the file to create | ||
117 | * @mode: the mode of the file to create | ||
118 | * @buf: the channel buffer | ||
119 | * @is_global: outparam - set non-zero if the buffer should be global | ||
120 | * | ||
121 | * Called during relay_open(), once for each per-cpu buffer, | ||
122 | * to allow the client to create a file to be used to | ||
123 | * represent the corresponding channel buffer. If the file is | ||
124 | * created outside of relayfs, the parent must also exist in | ||
125 | * that filesystem. | ||
126 | * | ||
127 | * The callback should return the dentry of the file created | ||
128 | * to represent the relay buffer. | ||
129 | * | ||
130 | * Setting the is_global outparam to a non-zero value will | ||
131 | * cause relay_open() to create a single global buffer rather | ||
132 | * than the default set of per-cpu buffers. | ||
133 | * | ||
134 | * See Documentation/filesystems/relayfs.txt for more info. | ||
135 | */ | ||
136 | struct dentry *(*create_buf_file)(const char *filename, | ||
137 | struct dentry *parent, | ||
138 | int mode, | ||
139 | struct rchan_buf *buf, | ||
140 | int *is_global); | ||
141 | |||
142 | /* | ||
143 | * remove_buf_file - remove file representing a relayfs channel buffer | ||
144 | * @dentry: the dentry of the file to remove | ||
145 | * | ||
146 | * Called during relay_close(), once for each per-cpu buffer, | ||
147 | * to allow the client to remove a file used to represent a | ||
148 | * channel buffer. | ||
149 | * | ||
150 | * The callback should return 0 if successful, negative if not. | ||
151 | */ | ||
152 | int (*remove_buf_file)(struct dentry *dentry); | ||
127 | }; | 153 | }; |
128 | 154 | ||
129 | /* | 155 | /* |
@@ -148,6 +174,12 @@ extern size_t relay_switch_subbuf(struct rchan_buf *buf, | |||
148 | extern struct dentry *relayfs_create_dir(const char *name, | 174 | extern struct dentry *relayfs_create_dir(const char *name, |
149 | struct dentry *parent); | 175 | struct dentry *parent); |
150 | extern int relayfs_remove_dir(struct dentry *dentry); | 176 | extern int relayfs_remove_dir(struct dentry *dentry); |
177 | extern struct dentry *relayfs_create_file(const char *name, | ||
178 | struct dentry *parent, | ||
179 | int mode, | ||
180 | struct file_operations *fops, | ||
181 | void *data); | ||
182 | extern int relayfs_remove_file(struct dentry *dentry); | ||
151 | 183 | ||
152 | /** | 184 | /** |
153 | * relay_write - write data into the channel | 185 | * relay_write - write data into the channel |
@@ -247,10 +279,9 @@ static inline void subbuf_start_reserve(struct rchan_buf *buf, | |||
247 | } | 279 | } |
248 | 280 | ||
249 | /* | 281 | /* |
250 | * exported relayfs file operations, fs/relayfs/inode.c | 282 | * exported relay file operations, fs/relayfs/inode.c |
251 | */ | 283 | */ |
252 | 284 | extern struct file_operations relay_file_operations; | |
253 | extern struct file_operations relayfs_file_operations; | ||
254 | 285 | ||
255 | #endif /* _LINUX_RELAYFS_FS_H */ | 286 | #endif /* _LINUX_RELAYFS_FS_H */ |
256 | 287 | ||
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index 3bd7cce19e26..157d7e3236b5 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/string.h> | ||
24 | #include <linux/rio.h> | 25 | #include <linux/rio.h> |
25 | 26 | ||
26 | extern int __rio_local_read_config_32(struct rio_mport *port, u32 offset, | 27 | extern int __rio_local_read_config_32(struct rio_mport *port, u32 offset, |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index e1aaf1fac8e0..0b2ba67ff13c 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef _LINUX_RTC_H_ | 11 | #ifndef _LINUX_RTC_H_ |
12 | #define _LINUX_RTC_H_ | 12 | #define _LINUX_RTC_H_ |
13 | 13 | ||
14 | #include <linux/interrupt.h> | ||
15 | |||
14 | /* | 16 | /* |
15 | * The struct used to pass data via the following ioctl. Similar to the | 17 | * The struct used to pass data via the following ioctl. Similar to the |
16 | * struct tm in <time.h>, but it needs to be here so that the kernel | 18 | * struct tm in <time.h>, but it needs to be here so that the kernel |
@@ -102,6 +104,7 @@ int rtc_register(rtc_task_t *task); | |||
102 | int rtc_unregister(rtc_task_t *task); | 104 | int rtc_unregister(rtc_task_t *task); |
103 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); | 105 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); |
104 | void rtc_get_rtc_time(struct rtc_time *rtc_tm); | 106 | void rtc_get_rtc_time(struct rtc_time *rtc_tm); |
107 | irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs); | ||
105 | 108 | ||
106 | #endif /* __KERNEL__ */ | 109 | #endif /* __KERNEL__ */ |
107 | 110 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 7da33619d5d0..78eb92ae4d94 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/percpu.h> | 34 | #include <linux/percpu.h> |
35 | #include <linux/topology.h> | 35 | #include <linux/topology.h> |
36 | #include <linux/seccomp.h> | 36 | #include <linux/seccomp.h> |
37 | #include <linux/rcupdate.h> | ||
37 | 38 | ||
38 | #include <linux/auxvec.h> /* For AT_VECTOR_SIZE */ | 39 | #include <linux/auxvec.h> /* For AT_VECTOR_SIZE */ |
39 | 40 | ||
@@ -350,8 +351,16 @@ struct sighand_struct { | |||
350 | atomic_t count; | 351 | atomic_t count; |
351 | struct k_sigaction action[_NSIG]; | 352 | struct k_sigaction action[_NSIG]; |
352 | spinlock_t siglock; | 353 | spinlock_t siglock; |
354 | struct rcu_head rcu; | ||
353 | }; | 355 | }; |
354 | 356 | ||
357 | extern void sighand_free_cb(struct rcu_head *rhp); | ||
358 | |||
359 | static inline void sighand_free(struct sighand_struct *sp) | ||
360 | { | ||
361 | call_rcu(&sp->rcu, sighand_free_cb); | ||
362 | } | ||
363 | |||
355 | /* | 364 | /* |
356 | * NOTE! "signal_struct" does not have it's own | 365 | * NOTE! "signal_struct" does not have it's own |
357 | * locking, because a shared signal_struct always | 366 | * locking, because a shared signal_struct always |
@@ -762,6 +771,7 @@ struct task_struct { | |||
762 | unsigned keep_capabilities:1; | 771 | unsigned keep_capabilities:1; |
763 | struct user_struct *user; | 772 | struct user_struct *user; |
764 | #ifdef CONFIG_KEYS | 773 | #ifdef CONFIG_KEYS |
774 | struct key *request_key_auth; /* assumed request_key authority */ | ||
765 | struct key *thread_keyring; /* keyring private to this thread */ | 775 | struct key *thread_keyring; /* keyring private to this thread */ |
766 | unsigned char jit_keyring; /* default keyring to attach requested keys to */ | 776 | unsigned char jit_keyring; /* default keyring to attach requested keys to */ |
767 | #endif | 777 | #endif |
@@ -844,6 +854,7 @@ struct task_struct { | |||
844 | int cpuset_mems_generation; | 854 | int cpuset_mems_generation; |
845 | #endif | 855 | #endif |
846 | atomic_t fs_excl; /* holding fs exclusive resources */ | 856 | atomic_t fs_excl; /* holding fs exclusive resources */ |
857 | struct rcu_head rcu; | ||
847 | }; | 858 | }; |
848 | 859 | ||
849 | static inline pid_t process_group(struct task_struct *tsk) | 860 | static inline pid_t process_group(struct task_struct *tsk) |
@@ -867,8 +878,14 @@ static inline int pid_alive(struct task_struct *p) | |||
867 | extern void free_task(struct task_struct *tsk); | 878 | extern void free_task(struct task_struct *tsk); |
868 | extern void __put_task_struct(struct task_struct *tsk); | 879 | extern void __put_task_struct(struct task_struct *tsk); |
869 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | 880 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) |
870 | #define put_task_struct(tsk) \ | 881 | |
871 | do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0) | 882 | extern void __put_task_struct_cb(struct rcu_head *rhp); |
883 | |||
884 | static inline void put_task_struct(struct task_struct *t) | ||
885 | { | ||
886 | if (atomic_dec_and_test(&t->usage)) | ||
887 | call_rcu(&t->rcu, __put_task_struct_cb); | ||
888 | } | ||
872 | 889 | ||
873 | /* | 890 | /* |
874 | * Per process flags | 891 | * Per process flags |
@@ -895,6 +912,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0) | |||
895 | #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ | 912 | #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ |
896 | #define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ | 913 | #define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ |
897 | #define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */ | 914 | #define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */ |
915 | #define PF_SWAPWRITE 0x01000000 /* Allowed to write to swap */ | ||
898 | 916 | ||
899 | /* | 917 | /* |
900 | * Only the _current_ task can read/write to tsk->flags, but other | 918 | * Only the _current_ task can read/write to tsk->flags, but other |
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h new file mode 100644 index 000000000000..76850b75b3f6 --- /dev/null +++ b/include/linux/screen_info.h | |||
@@ -0,0 +1,77 @@ | |||
1 | #ifndef _SCREEN_INFO_H | ||
2 | #define _SCREEN_INFO_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* | ||
7 | * These are set up by the setup-routine at boot-time: | ||
8 | */ | ||
9 | |||
10 | struct screen_info { | ||
11 | u8 orig_x; /* 0x00 */ | ||
12 | u8 orig_y; /* 0x01 */ | ||
13 | u16 dontuse1; /* 0x02 -- EXT_MEM_K sits here */ | ||
14 | u16 orig_video_page; /* 0x04 */ | ||
15 | u8 orig_video_mode; /* 0x06 */ | ||
16 | u8 orig_video_cols; /* 0x07 */ | ||
17 | u16 unused2; /* 0x08 */ | ||
18 | u16 orig_video_ega_bx; /* 0x0a */ | ||
19 | u16 unused3; /* 0x0c */ | ||
20 | u8 orig_video_lines; /* 0x0e */ | ||
21 | u8 orig_video_isVGA; /* 0x0f */ | ||
22 | u16 orig_video_points; /* 0x10 */ | ||
23 | |||
24 | /* VESA graphic mode -- linear frame buffer */ | ||
25 | u16 lfb_width; /* 0x12 */ | ||
26 | u16 lfb_height; /* 0x14 */ | ||
27 | u16 lfb_depth; /* 0x16 */ | ||
28 | u32 lfb_base; /* 0x18 */ | ||
29 | u32 lfb_size; /* 0x1c */ | ||
30 | u16 dontuse2, dontuse3; /* 0x20 -- CL_MAGIC and CL_OFFSET here */ | ||
31 | u16 lfb_linelength; /* 0x24 */ | ||
32 | u8 red_size; /* 0x26 */ | ||
33 | u8 red_pos; /* 0x27 */ | ||
34 | u8 green_size; /* 0x28 */ | ||
35 | u8 green_pos; /* 0x29 */ | ||
36 | u8 blue_size; /* 0x2a */ | ||
37 | u8 blue_pos; /* 0x2b */ | ||
38 | u8 rsvd_size; /* 0x2c */ | ||
39 | u8 rsvd_pos; /* 0x2d */ | ||
40 | u16 vesapm_seg; /* 0x2e */ | ||
41 | u16 vesapm_off; /* 0x30 */ | ||
42 | u16 pages; /* 0x32 */ | ||
43 | u16 vesa_attributes; /* 0x34 */ | ||
44 | u32 capabilities; /* 0x36 */ | ||
45 | /* 0x3a -- 0x3f reserved for future expansion */ | ||
46 | }; | ||
47 | |||
48 | extern struct screen_info screen_info; | ||
49 | |||
50 | #define ORIG_X (screen_info.orig_x) | ||
51 | #define ORIG_Y (screen_info.orig_y) | ||
52 | #define ORIG_VIDEO_MODE (screen_info.orig_video_mode) | ||
53 | #define ORIG_VIDEO_COLS (screen_info.orig_video_cols) | ||
54 | #define ORIG_VIDEO_EGA_BX (screen_info.orig_video_ega_bx) | ||
55 | #define ORIG_VIDEO_LINES (screen_info.orig_video_lines) | ||
56 | #define ORIG_VIDEO_ISVGA (screen_info.orig_video_isVGA) | ||
57 | #define ORIG_VIDEO_POINTS (screen_info.orig_video_points) | ||
58 | |||
59 | #define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ | ||
60 | #define VIDEO_TYPE_CGA 0x11 /* CGA Display */ | ||
61 | #define VIDEO_TYPE_EGAM 0x20 /* EGA/VGA in Monochrome Mode */ | ||
62 | #define VIDEO_TYPE_EGAC 0x21 /* EGA in Color Mode */ | ||
63 | #define VIDEO_TYPE_VGAC 0x22 /* VGA+ in Color Mode */ | ||
64 | #define VIDEO_TYPE_VLFB 0x23 /* VESA VGA in graphic mode */ | ||
65 | |||
66 | #define VIDEO_TYPE_PICA_S3 0x30 /* ACER PICA-61 local S3 video */ | ||
67 | #define VIDEO_TYPE_MIPS_G364 0x31 /* MIPS Magnum 4000 G364 video */ | ||
68 | #define VIDEO_TYPE_SGI 0x33 /* Various SGI graphics hardware */ | ||
69 | |||
70 | #define VIDEO_TYPE_TGAC 0x40 /* DEC TGA */ | ||
71 | |||
72 | #define VIDEO_TYPE_SUN 0x50 /* Sun frame buffer. */ | ||
73 | #define VIDEO_TYPE_SUNPCI 0x51 /* Sun PCI based frame buffer. */ | ||
74 | |||
75 | #define VIDEO_TYPE_PMAC 0x60 /* PowerMacintosh frame buffer. */ | ||
76 | |||
77 | #endif /* _SCREEN_INFO_H */ | ||
diff --git a/include/linux/sdla.h b/include/linux/sdla.h index 3b6afb8caa42..564acd3a71c1 100644 --- a/include/linux/sdla.h +++ b/include/linux/sdla.h | |||
@@ -293,46 +293,46 @@ void sdla(void *cfg_info, char *dev, struct frad_conf *conf, int quiet); | |||
293 | #define SDLA_S508_INTEN 0x10 | 293 | #define SDLA_S508_INTEN 0x10 |
294 | 294 | ||
295 | struct sdla_cmd { | 295 | struct sdla_cmd { |
296 | char opp_flag __attribute__((packed)); | 296 | char opp_flag; |
297 | char cmd __attribute__((packed)); | 297 | char cmd; |
298 | short length __attribute__((packed)); | 298 | short length; |
299 | char retval __attribute__((packed)); | 299 | char retval; |
300 | short dlci __attribute__((packed)); | 300 | short dlci; |
301 | char flags __attribute__((packed)); | 301 | char flags; |
302 | short rxlost_int __attribute__((packed)); | 302 | short rxlost_int; |
303 | long rxlost_app __attribute__((packed)); | 303 | long rxlost_app; |
304 | char reserve[2] __attribute__((packed)); | 304 | char reserve[2]; |
305 | char data[SDLA_MAX_DATA] __attribute__((packed)); /* transfer data buffer */ | 305 | char data[SDLA_MAX_DATA]; /* transfer data buffer */ |
306 | }; | 306 | } __attribute__((packed)); |
307 | 307 | ||
308 | struct intr_info { | 308 | struct intr_info { |
309 | char flags __attribute__((packed)); | 309 | char flags; |
310 | short txlen __attribute__((packed)); | 310 | short txlen; |
311 | char irq __attribute__((packed)); | 311 | char irq; |
312 | char flags2 __attribute__((packed)); | 312 | char flags2; |
313 | short timeout __attribute__((packed)); | 313 | short timeout; |
314 | }; | 314 | } __attribute__((packed)); |
315 | 315 | ||
316 | /* found in the 508's control window at RXBUF_INFO */ | 316 | /* found in the 508's control window at RXBUF_INFO */ |
317 | struct buf_info { | 317 | struct buf_info { |
318 | unsigned short rse_num __attribute__((packed)); | 318 | unsigned short rse_num; |
319 | unsigned long rse_base __attribute__((packed)); | 319 | unsigned long rse_base; |
320 | unsigned long rse_next __attribute__((packed)); | 320 | unsigned long rse_next; |
321 | unsigned long buf_base __attribute__((packed)); | 321 | unsigned long buf_base; |
322 | unsigned short reserved __attribute__((packed)); | 322 | unsigned short reserved; |
323 | unsigned long buf_top __attribute__((packed)); | 323 | unsigned long buf_top; |
324 | }; | 324 | } __attribute__((packed)); |
325 | 325 | ||
326 | /* structure pointed to by rse_base in RXBUF_INFO struct */ | 326 | /* structure pointed to by rse_base in RXBUF_INFO struct */ |
327 | struct buf_entry { | 327 | struct buf_entry { |
328 | char opp_flag __attribute__((packed)); | 328 | char opp_flag; |
329 | short length __attribute__((packed)); | 329 | short length; |
330 | short dlci __attribute__((packed)); | 330 | short dlci; |
331 | char flags __attribute__((packed)); | 331 | char flags; |
332 | short timestamp __attribute__((packed)); | 332 | short timestamp; |
333 | short reserved[2] __attribute__((packed)); | 333 | short reserved[2]; |
334 | long buf_addr __attribute__((packed)); | 334 | long buf_addr; |
335 | }; | 335 | } __attribute__((packed)); |
336 | 336 | ||
337 | #endif | 337 | #endif |
338 | 338 | ||
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index dc89116bb1ca..cd2773b29a64 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
@@ -26,11 +26,7 @@ static inline int has_secure_computing(struct thread_info *ti) | |||
26 | 26 | ||
27 | #else /* CONFIG_SECCOMP */ | 27 | #else /* CONFIG_SECCOMP */ |
28 | 28 | ||
29 | #if (__GNUC__ > 2) | 29 | typedef struct { } seccomp_t; |
30 | typedef struct { } seccomp_t; | ||
31 | #else | ||
32 | typedef struct { int gcc_is_buggy; } seccomp_t; | ||
33 | #endif | ||
34 | 30 | ||
35 | #define secure_computing(x) do { } while (0) | 31 | #define secure_computing(x) do { } while (0) |
36 | /* static inline to preserve typechecking */ | 32 | /* static inline to preserve typechecking */ |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 5dd5f02c5c5f..b7d093520bb6 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -18,6 +18,19 @@ | |||
18 | #define SA_PROBE SA_ONESHOT | 18 | #define SA_PROBE SA_ONESHOT |
19 | #define SA_SAMPLE_RANDOM SA_RESTART | 19 | #define SA_SAMPLE_RANDOM SA_RESTART |
20 | #define SA_SHIRQ 0x04000000 | 20 | #define SA_SHIRQ 0x04000000 |
21 | /* | ||
22 | * As above, these correspond to the IORESOURCE_IRQ_* defines in | ||
23 | * linux/ioport.h to select the interrupt line behaviour. When | ||
24 | * requesting an interrupt without specifying a SA_TRIGGER, the | ||
25 | * setting should be assumed to be "as already configured", which | ||
26 | * may be as per machine or firmware initialisation. | ||
27 | */ | ||
28 | #define SA_TRIGGER_LOW 0x00000008 | ||
29 | #define SA_TRIGGER_HIGH 0x00000004 | ||
30 | #define SA_TRIGGER_FALLING 0x00000002 | ||
31 | #define SA_TRIGGER_RISING 0x00000001 | ||
32 | #define SA_TRIGGER_MASK (SA_TRIGGER_HIGH|SA_TRIGGER_LOW|\ | ||
33 | SA_TRIGGER_RISING|SA_TRIGGER_FALLING) | ||
21 | 34 | ||
22 | /* | 35 | /* |
23 | * Real Time signals may be queued. | 36 | * Real Time signals may be queued. |
@@ -81,6 +94,23 @@ static inline int sigfindinword(unsigned long word) | |||
81 | 94 | ||
82 | #endif /* __HAVE_ARCH_SIG_BITOPS */ | 95 | #endif /* __HAVE_ARCH_SIG_BITOPS */ |
83 | 96 | ||
97 | static inline int sigisemptyset(sigset_t *set) | ||
98 | { | ||
99 | extern void _NSIG_WORDS_is_unsupported_size(void); | ||
100 | switch (_NSIG_WORDS) { | ||
101 | case 4: | ||
102 | return (set->sig[3] | set->sig[2] | | ||
103 | set->sig[1] | set->sig[0]) == 0; | ||
104 | case 2: | ||
105 | return (set->sig[1] | set->sig[0]) == 0; | ||
106 | case 1: | ||
107 | return set->sig[0] == 0; | ||
108 | default: | ||
109 | _NSIG_WORDS_is_unsupported_size(); | ||
110 | return 0; | ||
111 | } | ||
112 | } | ||
113 | |||
84 | #define sigmask(sig) (1UL << ((sig) - 1)) | 114 | #define sigmask(sig) (1UL << ((sig) - 1)) |
85 | 115 | ||
86 | #ifndef __HAVE_ARCH_SIG_SETOPS | 116 | #ifndef __HAVE_ARCH_SIG_SETOPS |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 483cfc47ec34..e5fd66c5650b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -251,7 +251,7 @@ struct sk_buff { | |||
251 | * want to keep them across layers you have to do a skb_clone() | 251 | * want to keep them across layers you have to do a skb_clone() |
252 | * first. This is owned by whoever has the skb queued ATM. | 252 | * first. This is owned by whoever has the skb queued ATM. |
253 | */ | 253 | */ |
254 | char cb[40]; | 254 | char cb[48]; |
255 | 255 | ||
256 | unsigned int len, | 256 | unsigned int len, |
257 | data_len, | 257 | data_len, |
diff --git a/include/linux/slab.h b/include/linux/slab.h index d1ea4051b996..1fb77a9cc148 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -53,6 +53,8 @@ typedef struct kmem_cache kmem_cache_t; | |||
53 | #define SLAB_CTOR_ATOMIC 0x002UL /* tell constructor it can't sleep */ | 53 | #define SLAB_CTOR_ATOMIC 0x002UL /* tell constructor it can't sleep */ |
54 | #define SLAB_CTOR_VERIFY 0x004UL /* tell constructor it's a verify call */ | 54 | #define SLAB_CTOR_VERIFY 0x004UL /* tell constructor it's a verify call */ |
55 | 55 | ||
56 | #ifndef CONFIG_SLOB | ||
57 | |||
56 | /* prototypes */ | 58 | /* prototypes */ |
57 | extern void __init kmem_cache_init(void); | 59 | extern void __init kmem_cache_init(void); |
58 | 60 | ||
@@ -134,6 +136,39 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
134 | extern int FASTCALL(kmem_cache_reap(int)); | 136 | extern int FASTCALL(kmem_cache_reap(int)); |
135 | extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr)); | 137 | extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr)); |
136 | 138 | ||
139 | #else /* CONFIG_SLOB */ | ||
140 | |||
141 | /* SLOB allocator routines */ | ||
142 | |||
143 | void kmem_cache_init(void); | ||
144 | struct kmem_cache *kmem_find_general_cachep(size_t, gfp_t gfpflags); | ||
145 | struct kmem_cache *kmem_cache_create(const char *c, size_t, size_t, | ||
146 | unsigned long, | ||
147 | void (*)(void *, struct kmem_cache *, unsigned long), | ||
148 | void (*)(void *, struct kmem_cache *, unsigned long)); | ||
149 | int kmem_cache_destroy(struct kmem_cache *c); | ||
150 | void *kmem_cache_alloc(struct kmem_cache *c, gfp_t flags); | ||
151 | void kmem_cache_free(struct kmem_cache *c, void *b); | ||
152 | const char *kmem_cache_name(struct kmem_cache *); | ||
153 | void *kmalloc(size_t size, gfp_t flags); | ||
154 | void *kzalloc(size_t size, gfp_t flags); | ||
155 | void kfree(const void *m); | ||
156 | unsigned int ksize(const void *m); | ||
157 | unsigned int kmem_cache_size(struct kmem_cache *c); | ||
158 | |||
159 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | ||
160 | { | ||
161 | return kzalloc(n * size, flags); | ||
162 | } | ||
163 | |||
164 | #define kmem_cache_shrink(d) (0) | ||
165 | #define kmem_cache_reap(a) | ||
166 | #define kmem_ptr_validate(a, b) (0) | ||
167 | #define kmem_cache_alloc_node(c, f, n) kmem_cache_alloc(c, f) | ||
168 | #define kmalloc_node(s, f, n) kmalloc(s, f) | ||
169 | |||
170 | #endif /* CONFIG_SLOB */ | ||
171 | |||
137 | /* System wide caches */ | 172 | /* System wide caches */ |
138 | extern kmem_cache_t *vm_area_cachep; | 173 | extern kmem_cache_t *vm_area_cachep; |
139 | extern kmem_cache_t *names_cachep; | 174 | extern kmem_cache_t *names_cachep; |
diff --git a/include/linux/spinlock_types_up.h b/include/linux/spinlock_types_up.h index def2d173a8db..04135b0e198e 100644 --- a/include/linux/spinlock_types_up.h +++ b/include/linux/spinlock_types_up.h | |||
@@ -22,30 +22,16 @@ typedef struct { | |||
22 | 22 | ||
23 | #else | 23 | #else |
24 | 24 | ||
25 | /* | ||
26 | * All gcc 2.95 versions and early versions of 2.96 have a nasty bug | ||
27 | * with empty initializers. | ||
28 | */ | ||
29 | #if (__GNUC__ > 2) | ||
30 | typedef struct { } raw_spinlock_t; | 25 | typedef struct { } raw_spinlock_t; |
31 | 26 | ||
32 | #define __RAW_SPIN_LOCK_UNLOCKED { } | 27 | #define __RAW_SPIN_LOCK_UNLOCKED { } |
33 | #else | ||
34 | typedef struct { int gcc_is_buggy; } raw_spinlock_t; | ||
35 | #define __RAW_SPIN_LOCK_UNLOCKED (raw_spinlock_t) { 0 } | ||
36 | #endif | ||
37 | 28 | ||
38 | #endif | 29 | #endif |
39 | 30 | ||
40 | #if (__GNUC__ > 2) | ||
41 | typedef struct { | 31 | typedef struct { |
42 | /* no debug version on UP */ | 32 | /* no debug version on UP */ |
43 | } raw_rwlock_t; | 33 | } raw_rwlock_t; |
44 | 34 | ||
45 | #define __RAW_RW_LOCK_UNLOCKED { } | 35 | #define __RAW_RW_LOCK_UNLOCKED { } |
46 | #else | ||
47 | typedef struct { int gcc_is_buggy; } raw_rwlock_t; | ||
48 | #define __RAW_RW_LOCK_UNLOCKED (raw_rwlock_t) { 0 } | ||
49 | #endif | ||
50 | 36 | ||
51 | #endif /* __LINUX_SPINLOCK_TYPES_UP_H */ | 37 | #endif /* __LINUX_SPINLOCK_TYPES_UP_H */ |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 556617bcf7ac..389d1c382e20 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -175,6 +175,13 @@ extern int try_to_free_pages(struct zone **, gfp_t); | |||
175 | extern int shrink_all_memory(int); | 175 | extern int shrink_all_memory(int); |
176 | extern int vm_swappiness; | 176 | extern int vm_swappiness; |
177 | 177 | ||
178 | #ifdef CONFIG_MIGRATION | ||
179 | extern int isolate_lru_page(struct page *p); | ||
180 | extern int putback_lru_pages(struct list_head *l); | ||
181 | extern int migrate_pages(struct list_head *l, struct list_head *t, | ||
182 | struct list_head *moved, struct list_head *failed); | ||
183 | #endif | ||
184 | |||
178 | #ifdef CONFIG_MMU | 185 | #ifdef CONFIG_MMU |
179 | /* linux/mm/shmem.c */ | 186 | /* linux/mm/shmem.c */ |
180 | extern int shmem_unuse(swp_entry_t entry, struct page *page); | 187 | extern int shmem_unuse(swp_entry_t entry, struct page *page); |
@@ -192,7 +199,7 @@ extern int rw_swap_page_sync(int, swp_entry_t, struct page *); | |||
192 | extern struct address_space swapper_space; | 199 | extern struct address_space swapper_space; |
193 | #define total_swapcache_pages swapper_space.nrpages | 200 | #define total_swapcache_pages swapper_space.nrpages |
194 | extern void show_swap_cache_info(void); | 201 | extern void show_swap_cache_info(void); |
195 | extern int add_to_swap(struct page *); | 202 | extern int add_to_swap(struct page *, gfp_t); |
196 | extern void __delete_from_swap_cache(struct page *); | 203 | extern void __delete_from_swap_cache(struct page *); |
197 | extern void delete_from_swap_cache(struct page *); | 204 | extern void delete_from_swap_cache(struct page *); |
198 | extern int move_to_swap_cache(struct page *, swp_entry_t); | 205 | extern int move_to_swap_cache(struct page *, swp_entry_t); |
diff --git a/include/linux/synclink.h b/include/linux/synclink.h index 763bd290f28d..1b7cd8d1a71b 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * SyncLink Multiprotocol Serial Adapter Driver | 2 | * SyncLink Multiprotocol Serial Adapter Driver |
3 | * | 3 | * |
4 | * $Id: synclink.h,v 3.6 2002/02/20 21:58:20 paulkf Exp $ | 4 | * $Id: synclink.h,v 3.10 2005/11/08 19:50:54 paulkf Exp $ |
5 | * | 5 | * |
6 | * Copyright (C) 1998-2000 by Microgate Corporation | 6 | * Copyright (C) 1998-2000 by Microgate Corporation |
7 | * | 7 | * |
@@ -128,10 +128,14 @@ | |||
128 | #define MGSL_BUS_TYPE_EISA 2 | 128 | #define MGSL_BUS_TYPE_EISA 2 |
129 | #define MGSL_BUS_TYPE_PCI 5 | 129 | #define MGSL_BUS_TYPE_PCI 5 |
130 | 130 | ||
131 | #define MGSL_INTERFACE_MASK 0xf | ||
131 | #define MGSL_INTERFACE_DISABLE 0 | 132 | #define MGSL_INTERFACE_DISABLE 0 |
132 | #define MGSL_INTERFACE_RS232 1 | 133 | #define MGSL_INTERFACE_RS232 1 |
133 | #define MGSL_INTERFACE_V35 2 | 134 | #define MGSL_INTERFACE_V35 2 |
134 | #define MGSL_INTERFACE_RS422 3 | 135 | #define MGSL_INTERFACE_RS422 3 |
136 | #define MGSL_INTERFACE_RTS_EN 0x10 | ||
137 | #define MGSL_INTERFACE_LL 0x20 | ||
138 | #define MGSL_INTERFACE_RL 0x40 | ||
135 | 139 | ||
136 | typedef struct _MGSL_PARAMS | 140 | typedef struct _MGSL_PARAMS |
137 | { | 141 | { |
@@ -163,6 +167,9 @@ typedef struct _MGSL_PARAMS | |||
163 | #define SYNCLINK_DEVICE_ID 0x0010 | 167 | #define SYNCLINK_DEVICE_ID 0x0010 |
164 | #define MGSCC_DEVICE_ID 0x0020 | 168 | #define MGSCC_DEVICE_ID 0x0020 |
165 | #define SYNCLINK_SCA_DEVICE_ID 0x0030 | 169 | #define SYNCLINK_SCA_DEVICE_ID 0x0030 |
170 | #define SYNCLINK_GT_DEVICE_ID 0x0070 | ||
171 | #define SYNCLINK_GT4_DEVICE_ID 0x0080 | ||
172 | #define SYNCLINK_AC_DEVICE_ID 0x0090 | ||
166 | #define MGSL_MAX_SERIAL_NUMBER 30 | 173 | #define MGSL_MAX_SERIAL_NUMBER 30 |
167 | 174 | ||
168 | /* | 175 | /* |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index c7007b1db91d..e910d1a481df 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -511,5 +511,7 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio); | |||
511 | asmlinkage long sys_ioprio_get(int which, int who); | 511 | asmlinkage long sys_ioprio_get(int which, int who); |
512 | asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask, | 512 | asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask, |
513 | unsigned long maxnode); | 513 | unsigned long maxnode); |
514 | asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode, | ||
515 | const unsigned long __user *from, const unsigned long __user *to); | ||
514 | 516 | ||
515 | #endif | 517 | #endif |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index a9b80fc7f0f3..7f472127b7b5 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -180,6 +180,8 @@ enum | |||
180 | VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */ | 180 | VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */ |
181 | VM_LEGACY_VA_LAYOUT=27, /* legacy/compatibility virtual address space layout */ | 181 | VM_LEGACY_VA_LAYOUT=27, /* legacy/compatibility virtual address space layout */ |
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 */ | ||
184 | VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */ | ||
183 | }; | 185 | }; |
184 | 186 | ||
185 | 187 | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index 1267f88ece6e..57449704a47b 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
24 | #include <linux/tty_driver.h> | 24 | #include <linux/tty_driver.h> |
25 | #include <linux/tty_ldisc.h> | 25 | #include <linux/tty_ldisc.h> |
26 | #include <linux/screen_info.h> | ||
26 | 27 | ||
27 | #include <asm/system.h> | 28 | #include <asm/system.h> |
28 | 29 | ||
@@ -37,77 +38,6 @@ | |||
37 | #define NR_LDISCS 16 | 38 | #define NR_LDISCS 16 |
38 | 39 | ||
39 | /* | 40 | /* |
40 | * These are set up by the setup-routine at boot-time: | ||
41 | */ | ||
42 | |||
43 | struct screen_info { | ||
44 | u8 orig_x; /* 0x00 */ | ||
45 | u8 orig_y; /* 0x01 */ | ||
46 | u16 dontuse1; /* 0x02 -- EXT_MEM_K sits here */ | ||
47 | u16 orig_video_page; /* 0x04 */ | ||
48 | u8 orig_video_mode; /* 0x06 */ | ||
49 | u8 orig_video_cols; /* 0x07 */ | ||
50 | u16 unused2; /* 0x08 */ | ||
51 | u16 orig_video_ega_bx; /* 0x0a */ | ||
52 | u16 unused3; /* 0x0c */ | ||
53 | u8 orig_video_lines; /* 0x0e */ | ||
54 | u8 orig_video_isVGA; /* 0x0f */ | ||
55 | u16 orig_video_points; /* 0x10 */ | ||
56 | |||
57 | /* VESA graphic mode -- linear frame buffer */ | ||
58 | u16 lfb_width; /* 0x12 */ | ||
59 | u16 lfb_height; /* 0x14 */ | ||
60 | u16 lfb_depth; /* 0x16 */ | ||
61 | u32 lfb_base; /* 0x18 */ | ||
62 | u32 lfb_size; /* 0x1c */ | ||
63 | u16 dontuse2, dontuse3; /* 0x20 -- CL_MAGIC and CL_OFFSET here */ | ||
64 | u16 lfb_linelength; /* 0x24 */ | ||
65 | u8 red_size; /* 0x26 */ | ||
66 | u8 red_pos; /* 0x27 */ | ||
67 | u8 green_size; /* 0x28 */ | ||
68 | u8 green_pos; /* 0x29 */ | ||
69 | u8 blue_size; /* 0x2a */ | ||
70 | u8 blue_pos; /* 0x2b */ | ||
71 | u8 rsvd_size; /* 0x2c */ | ||
72 | u8 rsvd_pos; /* 0x2d */ | ||
73 | u16 vesapm_seg; /* 0x2e */ | ||
74 | u16 vesapm_off; /* 0x30 */ | ||
75 | u16 pages; /* 0x32 */ | ||
76 | u16 vesa_attributes; /* 0x34 */ | ||
77 | u32 capabilities; /* 0x36 */ | ||
78 | /* 0x3a -- 0x3f reserved for future expansion */ | ||
79 | }; | ||
80 | |||
81 | extern struct screen_info screen_info; | ||
82 | |||
83 | #define ORIG_X (screen_info.orig_x) | ||
84 | #define ORIG_Y (screen_info.orig_y) | ||
85 | #define ORIG_VIDEO_MODE (screen_info.orig_video_mode) | ||
86 | #define ORIG_VIDEO_COLS (screen_info.orig_video_cols) | ||
87 | #define ORIG_VIDEO_EGA_BX (screen_info.orig_video_ega_bx) | ||
88 | #define ORIG_VIDEO_LINES (screen_info.orig_video_lines) | ||
89 | #define ORIG_VIDEO_ISVGA (screen_info.orig_video_isVGA) | ||
90 | #define ORIG_VIDEO_POINTS (screen_info.orig_video_points) | ||
91 | |||
92 | #define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ | ||
93 | #define VIDEO_TYPE_CGA 0x11 /* CGA Display */ | ||
94 | #define VIDEO_TYPE_EGAM 0x20 /* EGA/VGA in Monochrome Mode */ | ||
95 | #define VIDEO_TYPE_EGAC 0x21 /* EGA in Color Mode */ | ||
96 | #define VIDEO_TYPE_VGAC 0x22 /* VGA+ in Color Mode */ | ||
97 | #define VIDEO_TYPE_VLFB 0x23 /* VESA VGA in graphic mode */ | ||
98 | |||
99 | #define VIDEO_TYPE_PICA_S3 0x30 /* ACER PICA-61 local S3 video */ | ||
100 | #define VIDEO_TYPE_MIPS_G364 0x31 /* MIPS Magnum 4000 G364 video */ | ||
101 | #define VIDEO_TYPE_SGI 0x33 /* Various SGI graphics hardware */ | ||
102 | |||
103 | #define VIDEO_TYPE_TGAC 0x40 /* DEC TGA */ | ||
104 | |||
105 | #define VIDEO_TYPE_SUN 0x50 /* Sun frame buffer. */ | ||
106 | #define VIDEO_TYPE_SUNPCI 0x51 /* Sun PCI based frame buffer. */ | ||
107 | |||
108 | #define VIDEO_TYPE_PMAC 0x60 /* PowerMacintosh frame buffer. */ | ||
109 | |||
110 | /* | ||
111 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 41 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
112 | * a c_cc[] character, but indicates that a particular special character | 42 | * a c_cc[] character, but indicates that a particular special character |
113 | * isn't in use (eg VINTR has no character etc) | 43 | * isn't in use (eg VINTR has no character etc) |
diff --git a/include/linux/wavefront.h b/include/linux/wavefront.h index 61bd0fd35240..51ab3c933acd 100644 --- a/include/linux/wavefront.h +++ b/include/linux/wavefront.h | |||
@@ -434,22 +434,22 @@ typedef struct wf_multisample { | |||
434 | } wavefront_multisample; | 434 | } wavefront_multisample; |
435 | 435 | ||
436 | typedef struct wf_alias { | 436 | typedef struct wf_alias { |
437 | INT16 OriginalSample __attribute__ ((packed)); | 437 | INT16 OriginalSample; |
438 | 438 | ||
439 | struct wf_sample_offset sampleStartOffset __attribute__ ((packed)); | 439 | struct wf_sample_offset sampleStartOffset; |
440 | struct wf_sample_offset loopStartOffset __attribute__ ((packed)); | 440 | struct wf_sample_offset loopStartOffset; |
441 | struct wf_sample_offset sampleEndOffset __attribute__ ((packed)); | 441 | struct wf_sample_offset sampleEndOffset; |
442 | struct wf_sample_offset loopEndOffset __attribute__ ((packed)); | 442 | struct wf_sample_offset loopEndOffset; |
443 | 443 | ||
444 | INT16 FrequencyBias __attribute__ ((packed)); | 444 | INT16 FrequencyBias; |
445 | 445 | ||
446 | UCHAR8 SampleResolution:2 __attribute__ ((packed)); | 446 | UCHAR8 SampleResolution:2; |
447 | UCHAR8 Unused1:1 __attribute__ ((packed)); | 447 | UCHAR8 Unused1:1; |
448 | UCHAR8 Loop:1 __attribute__ ((packed)); | 448 | UCHAR8 Loop:1; |
449 | UCHAR8 Bidirectional:1 __attribute__ ((packed)); | 449 | UCHAR8 Bidirectional:1; |
450 | UCHAR8 Unused2:1 __attribute__ ((packed)); | 450 | UCHAR8 Unused2:1; |
451 | UCHAR8 Reverse:1 __attribute__ ((packed)); | 451 | UCHAR8 Reverse:1; |
452 | UCHAR8 Unused3:1 __attribute__ ((packed)); | 452 | UCHAR8 Unused3:1; |
453 | 453 | ||
454 | /* This structure is meant to be padded only to 16 bits on their | 454 | /* This structure is meant to be padded only to 16 bits on their |
455 | original. Of course, whoever wrote their documentation didn't | 455 | original. Of course, whoever wrote their documentation didn't |
@@ -460,8 +460,8 @@ typedef struct wf_alias { | |||
460 | standard 16->32 bit issues. | 460 | standard 16->32 bit issues. |
461 | */ | 461 | */ |
462 | 462 | ||
463 | UCHAR8 sixteen_bit_padding __attribute__ ((packed)); | 463 | UCHAR8 sixteen_bit_padding; |
464 | } wavefront_alias; | 464 | } __attribute__((packed)) wavefront_alias; |
465 | 465 | ||
466 | typedef struct wf_drum { | 466 | typedef struct wf_drum { |
467 | UCHAR8 PatchNumber; | 467 | UCHAR8 PatchNumber; |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index ac39d04d027c..86b111300231 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -65,6 +65,7 @@ extern int FASTCALL(schedule_work(struct work_struct *work)); | |||
65 | extern int FASTCALL(schedule_delayed_work(struct work_struct *work, unsigned long delay)); | 65 | extern int FASTCALL(schedule_delayed_work(struct work_struct *work, unsigned long delay)); |
66 | 66 | ||
67 | extern int schedule_delayed_work_on(int cpu, struct work_struct *work, unsigned long delay); | 67 | extern int schedule_delayed_work_on(int cpu, struct work_struct *work, unsigned long delay); |
68 | extern int schedule_on_each_cpu(void (*func)(void *info), void *info); | ||
68 | extern void flush_scheduled_work(void); | 69 | extern void flush_scheduled_work(void); |
69 | extern int current_is_keventd(void); | 70 | extern int current_is_keventd(void); |
70 | extern int keventd_up(void); | 71 | extern int keventd_up(void); |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index b096159086e8..beaef5c7a0ea 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -103,7 +103,9 @@ void balance_dirty_pages_ratelimited(struct address_space *mapping); | |||
103 | int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0); | 103 | int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0); |
104 | int do_writepages(struct address_space *mapping, struct writeback_control *wbc); | 104 | int do_writepages(struct address_space *mapping, struct writeback_control *wbc); |
105 | int sync_page_range(struct inode *inode, struct address_space *mapping, | 105 | int sync_page_range(struct inode *inode, struct address_space *mapping, |
106 | loff_t pos, size_t count); | 106 | loff_t pos, loff_t count); |
107 | int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, | ||
108 | loff_t pos, loff_t count); | ||
107 | 109 | ||
108 | /* pdflush.c */ | 110 | /* pdflush.c */ |
109 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl | 111 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl |
diff --git a/include/net/dn_dev.h b/include/net/dn_dev.h index 86e8e86e624a..5a86e78081bf 100644 --- a/include/net/dn_dev.h +++ b/include/net/dn_dev.h | |||
@@ -88,8 +88,8 @@ struct dn_dev { | |||
88 | struct net_device *dev; | 88 | struct net_device *dev; |
89 | struct dn_dev_parms parms; | 89 | struct dn_dev_parms parms; |
90 | char use_long; | 90 | char use_long; |
91 | struct timer_list timer; | 91 | struct timer_list timer; |
92 | unsigned long t3; | 92 | unsigned long t3; |
93 | struct neigh_parms *neigh_parms; | 93 | struct neigh_parms *neigh_parms; |
94 | unsigned char addr[ETH_ALEN]; | 94 | unsigned char addr[ETH_ALEN]; |
95 | struct neighbour *router; /* Default router on circuit */ | 95 | struct neighbour *router; /* Default router on circuit */ |
@@ -99,57 +99,57 @@ struct dn_dev { | |||
99 | 99 | ||
100 | struct dn_short_packet | 100 | struct dn_short_packet |
101 | { | 101 | { |
102 | unsigned char msgflg __attribute__((packed)); | 102 | unsigned char msgflg; |
103 | unsigned short dstnode __attribute__((packed)); | 103 | unsigned short dstnode; |
104 | unsigned short srcnode __attribute__((packed)); | 104 | unsigned short srcnode; |
105 | unsigned char forward __attribute__((packed)); | 105 | unsigned char forward; |
106 | }; | 106 | } __attribute__((packed)); |
107 | 107 | ||
108 | struct dn_long_packet | 108 | struct dn_long_packet |
109 | { | 109 | { |
110 | unsigned char msgflg __attribute__((packed)); | 110 | unsigned char msgflg; |
111 | unsigned char d_area __attribute__((packed)); | 111 | unsigned char d_area; |
112 | unsigned char d_subarea __attribute__((packed)); | 112 | unsigned char d_subarea; |
113 | unsigned char d_id[6] __attribute__((packed)); | 113 | unsigned char d_id[6]; |
114 | unsigned char s_area __attribute__((packed)); | 114 | unsigned char s_area; |
115 | unsigned char s_subarea __attribute__((packed)); | 115 | unsigned char s_subarea; |
116 | unsigned char s_id[6] __attribute__((packed)); | 116 | unsigned char s_id[6]; |
117 | unsigned char nl2 __attribute__((packed)); | 117 | unsigned char nl2; |
118 | unsigned char visit_ct __attribute__((packed)); | 118 | unsigned char visit_ct; |
119 | unsigned char s_class __attribute__((packed)); | 119 | unsigned char s_class; |
120 | unsigned char pt __attribute__((packed)); | 120 | unsigned char pt; |
121 | }; | 121 | } __attribute__((packed)); |
122 | 122 | ||
123 | /*------------------------- DRP - Routing messages ---------------------*/ | 123 | /*------------------------- DRP - Routing messages ---------------------*/ |
124 | 124 | ||
125 | struct endnode_hello_message | 125 | struct endnode_hello_message |
126 | { | 126 | { |
127 | unsigned char msgflg __attribute__((packed)); | 127 | unsigned char msgflg; |
128 | unsigned char tiver[3] __attribute__((packed)); | 128 | unsigned char tiver[3]; |
129 | unsigned char id[6] __attribute__((packed)); | 129 | unsigned char id[6]; |
130 | unsigned char iinfo __attribute__((packed)); | 130 | unsigned char iinfo; |
131 | unsigned short blksize __attribute__((packed)); | 131 | unsigned short blksize; |
132 | unsigned char area __attribute__((packed)); | 132 | unsigned char area; |
133 | unsigned char seed[8] __attribute__((packed)); | 133 | unsigned char seed[8]; |
134 | unsigned char neighbor[6] __attribute__((packed)); | 134 | unsigned char neighbor[6]; |
135 | unsigned short timer __attribute__((packed)); | 135 | unsigned short timer; |
136 | unsigned char mpd __attribute__((packed)); | 136 | unsigned char mpd; |
137 | unsigned char datalen __attribute__((packed)); | 137 | unsigned char datalen; |
138 | unsigned char data[2] __attribute__((packed)); | 138 | unsigned char data[2]; |
139 | }; | 139 | } __attribute__((packed)); |
140 | 140 | ||
141 | struct rtnode_hello_message | 141 | struct rtnode_hello_message |
142 | { | 142 | { |
143 | unsigned char msgflg __attribute__((packed)); | 143 | unsigned char msgflg; |
144 | unsigned char tiver[3] __attribute__((packed)); | 144 | unsigned char tiver[3]; |
145 | unsigned char id[6] __attribute__((packed)); | 145 | unsigned char id[6]; |
146 | unsigned char iinfo __attribute__((packed)); | 146 | unsigned char iinfo; |
147 | unsigned short blksize __attribute__((packed)); | 147 | unsigned short blksize; |
148 | unsigned char priority __attribute__((packed)); | 148 | unsigned char priority; |
149 | unsigned char area __attribute__((packed)); | 149 | unsigned char area; |
150 | unsigned short timer __attribute__((packed)); | 150 | unsigned short timer; |
151 | unsigned char mpd __attribute__((packed)); | 151 | unsigned char mpd; |
152 | }; | 152 | } __attribute__((packed)); |
153 | 153 | ||
154 | 154 | ||
155 | extern void dn_dev_init(void); | 155 | extern void dn_dev_init(void); |
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h index 1ba03be0af3a..e6182b86262b 100644 --- a/include/net/dn_nsp.h +++ b/include/net/dn_nsp.h | |||
@@ -72,78 +72,78 @@ extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int nobl | |||
72 | 72 | ||
73 | struct nsp_data_seg_msg | 73 | struct nsp_data_seg_msg |
74 | { | 74 | { |
75 | unsigned char msgflg __attribute__((packed)); | 75 | unsigned char msgflg; |
76 | unsigned short dstaddr __attribute__((packed)); | 76 | unsigned short dstaddr; |
77 | unsigned short srcaddr __attribute__((packed)); | 77 | unsigned short srcaddr; |
78 | }; | 78 | } __attribute__((packed)); |
79 | 79 | ||
80 | struct nsp_data_opt_msg | 80 | struct nsp_data_opt_msg |
81 | { | 81 | { |
82 | unsigned short acknum __attribute__((packed)); | 82 | unsigned short acknum; |
83 | unsigned short segnum __attribute__((packed)); | 83 | unsigned short segnum; |
84 | unsigned short lsflgs __attribute__((packed)); | 84 | unsigned short lsflgs; |
85 | }; | 85 | } __attribute__((packed)); |
86 | 86 | ||
87 | struct nsp_data_opt_msg1 | 87 | struct nsp_data_opt_msg1 |
88 | { | 88 | { |
89 | unsigned short acknum __attribute__((packed)); | 89 | unsigned short acknum; |
90 | unsigned short segnum __attribute__((packed)); | 90 | unsigned short segnum; |
91 | }; | 91 | } __attribute__((packed)); |
92 | 92 | ||
93 | 93 | ||
94 | /* Acknowledgment Message (data/other data) */ | 94 | /* Acknowledgment Message (data/other data) */ |
95 | struct nsp_data_ack_msg | 95 | struct nsp_data_ack_msg |
96 | { | 96 | { |
97 | unsigned char msgflg __attribute__((packed)); | 97 | unsigned char msgflg; |
98 | unsigned short dstaddr __attribute__((packed)); | 98 | unsigned short dstaddr; |
99 | unsigned short srcaddr __attribute__((packed)); | 99 | unsigned short srcaddr; |
100 | unsigned short acknum __attribute__((packed)); | 100 | unsigned short acknum; |
101 | }; | 101 | } __attribute__((packed)); |
102 | 102 | ||
103 | /* Connect Acknowledgment Message */ | 103 | /* Connect Acknowledgment Message */ |
104 | struct nsp_conn_ack_msg | 104 | struct nsp_conn_ack_msg |
105 | { | 105 | { |
106 | unsigned char msgflg __attribute__((packed)); | 106 | unsigned char msgflg; |
107 | unsigned short dstaddr __attribute__((packed)); | 107 | unsigned short dstaddr; |
108 | }; | 108 | } __attribute__((packed)); |
109 | 109 | ||
110 | 110 | ||
111 | /* Connect Initiate/Retransmit Initiate/Connect Confirm */ | 111 | /* Connect Initiate/Retransmit Initiate/Connect Confirm */ |
112 | struct nsp_conn_init_msg | 112 | struct nsp_conn_init_msg |
113 | { | 113 | { |
114 | unsigned char msgflg __attribute__((packed)); | 114 | unsigned char msgflg; |
115 | #define NSP_CI 0x18 /* Connect Initiate */ | 115 | #define NSP_CI 0x18 /* Connect Initiate */ |
116 | #define NSP_RCI 0x68 /* Retrans. Conn Init */ | 116 | #define NSP_RCI 0x68 /* Retrans. Conn Init */ |
117 | unsigned short dstaddr __attribute__((packed)); | 117 | unsigned short dstaddr; |
118 | unsigned short srcaddr __attribute__((packed)); | 118 | unsigned short srcaddr; |
119 | unsigned char services __attribute__((packed)); | 119 | unsigned char services; |
120 | #define NSP_FC_NONE 0x00 /* Flow Control None */ | 120 | #define NSP_FC_NONE 0x00 /* Flow Control None */ |
121 | #define NSP_FC_SRC 0x04 /* Seg Req. Count */ | 121 | #define NSP_FC_SRC 0x04 /* Seg Req. Count */ |
122 | #define NSP_FC_SCMC 0x08 /* Sess. Control Mess */ | 122 | #define NSP_FC_SCMC 0x08 /* Sess. Control Mess */ |
123 | #define NSP_FC_MASK 0x0c /* FC type mask */ | 123 | #define NSP_FC_MASK 0x0c /* FC type mask */ |
124 | unsigned char info __attribute__((packed)); | 124 | unsigned char info; |
125 | unsigned short segsize __attribute__((packed)); | 125 | unsigned short segsize; |
126 | }; | 126 | } __attribute__((packed)); |
127 | 127 | ||
128 | /* Disconnect Initiate/Disconnect Confirm */ | 128 | /* Disconnect Initiate/Disconnect Confirm */ |
129 | struct nsp_disconn_init_msg | 129 | struct nsp_disconn_init_msg |
130 | { | 130 | { |
131 | unsigned char msgflg __attribute__((packed)); | 131 | unsigned char msgflg; |
132 | unsigned short dstaddr __attribute__((packed)); | 132 | unsigned short dstaddr; |
133 | unsigned short srcaddr __attribute__((packed)); | 133 | unsigned short srcaddr; |
134 | unsigned short reason __attribute__((packed)); | 134 | unsigned short reason; |
135 | }; | 135 | } __attribute__((packed)); |
136 | 136 | ||
137 | 137 | ||
138 | 138 | ||
139 | struct srcobj_fmt | 139 | struct srcobj_fmt |
140 | { | 140 | { |
141 | char format __attribute__((packed)); | 141 | char format; |
142 | unsigned char task __attribute__((packed)); | 142 | unsigned char task; |
143 | unsigned short grpcode __attribute__((packed)); | 143 | unsigned short grpcode; |
144 | unsigned short usrcode __attribute__((packed)); | 144 | unsigned short usrcode; |
145 | char dlen __attribute__((packed)); | 145 | char dlen; |
146 | }; | 146 | } __attribute__((packed)); |
147 | 147 | ||
148 | /* | 148 | /* |
149 | * A collection of functions for manipulating the sequence | 149 | * A collection of functions for manipulating the sequence |
diff --git a/include/net/dst.h b/include/net/dst.h index bee8b84d329d..5161e89017f9 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -225,16 +225,7 @@ static inline void dst_set_expires(struct dst_entry *dst, int timeout) | |||
225 | /* Output packet to network from transport. */ | 225 | /* Output packet to network from transport. */ |
226 | static inline int dst_output(struct sk_buff *skb) | 226 | static inline int dst_output(struct sk_buff *skb) |
227 | { | 227 | { |
228 | int err; | 228 | return skb->dst->output(skb); |
229 | |||
230 | for (;;) { | ||
231 | err = skb->dst->output(skb); | ||
232 | |||
233 | if (likely(err == 0)) | ||
234 | return err; | ||
235 | if (unlikely(err != NET_XMIT_BYPASS)) | ||
236 | return err; | ||
237 | } | ||
238 | } | 229 | } |
239 | 230 | ||
240 | /* Input packet from network to transport. */ | 231 | /* Input packet from network to transport. */ |
diff --git a/include/net/ip.h b/include/net/ip.h index 7bb5804847f2..8de0697b364c 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -37,11 +37,10 @@ struct inet_skb_parm | |||
37 | struct ip_options opt; /* Compiled IP options */ | 37 | struct ip_options opt; /* Compiled IP options */ |
38 | unsigned char flags; | 38 | unsigned char flags; |
39 | 39 | ||
40 | #define IPSKB_MASQUERADED 1 | 40 | #define IPSKB_FORWARDED 1 |
41 | #define IPSKB_TRANSLATED 2 | 41 | #define IPSKB_XFRM_TUNNEL_SIZE 2 |
42 | #define IPSKB_FORWARDED 4 | 42 | #define IPSKB_XFRM_TRANSFORMED 4 |
43 | #define IPSKB_XFRM_TUNNEL_SIZE 8 | 43 | #define IPSKB_FRAG_COMPLETE 8 |
44 | #define IPSKB_FRAG_COMPLETE 16 | ||
45 | }; | 44 | }; |
46 | 45 | ||
47 | struct ipcm_cookie | 46 | struct ipcm_cookie |
@@ -95,7 +94,6 @@ extern int ip_local_deliver(struct sk_buff *skb); | |||
95 | extern int ip_mr_input(struct sk_buff *skb); | 94 | extern int ip_mr_input(struct sk_buff *skb); |
96 | extern int ip_output(struct sk_buff *skb); | 95 | extern int ip_output(struct sk_buff *skb); |
97 | extern int ip_mc_output(struct sk_buff *skb); | 96 | extern int ip_mc_output(struct sk_buff *skb); |
98 | extern int ip_fragment(struct sk_buff *skb, int (*out)(struct sk_buff*)); | ||
99 | extern int ip_do_nat(struct sk_buff *skb); | 97 | extern int ip_do_nat(struct sk_buff *skb); |
100 | extern void ip_send_check(struct iphdr *ip); | 98 | extern void ip_send_check(struct iphdr *ip); |
101 | extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); | 99 | extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 860bbac4c4ee..3b1d963d396c 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -418,6 +418,8 @@ extern int ipv6_rcv(struct sk_buff *skb, | |||
418 | struct packet_type *pt, | 418 | struct packet_type *pt, |
419 | struct net_device *orig_dev); | 419 | struct net_device *orig_dev); |
420 | 420 | ||
421 | extern int ip6_rcv_finish(struct sk_buff *skb); | ||
422 | |||
421 | /* | 423 | /* |
422 | * upper-layer output functions | 424 | * upper-layer output functions |
423 | */ | 425 | */ |
diff --git a/include/net/protocol.h b/include/net/protocol.h index 63f7db99c2a6..6dc5970612d7 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h | |||
@@ -43,7 +43,7 @@ struct net_protocol { | |||
43 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 43 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) |
44 | struct inet6_protocol | 44 | struct inet6_protocol |
45 | { | 45 | { |
46 | int (*handler)(struct sk_buff **skb, unsigned int *nhoffp); | 46 | int (*handler)(struct sk_buff **skb); |
47 | 47 | ||
48 | void (*err_handler)(struct sk_buff *skb, | 48 | void (*err_handler)(struct sk_buff *skb, |
49 | struct inet6_skb_parm *opt, | 49 | struct inet6_skb_parm *opt, |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 07d7b50cdd76..d09ca0e7d139 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -668,7 +668,7 @@ static inline int xfrm6_policy_check(struct sock *sk, int dir, struct sk_buff *s | |||
668 | return xfrm_policy_check(sk, dir, skb, AF_INET6); | 668 | return xfrm_policy_check(sk, dir, skb, AF_INET6); |
669 | } | 669 | } |
670 | 670 | ||
671 | 671 | extern int xfrm_decode_session(struct sk_buff *skb, struct flowi *fl, unsigned short family); | |
672 | extern int __xfrm_route_forward(struct sk_buff *skb, unsigned short family); | 672 | extern int __xfrm_route_forward(struct sk_buff *skb, unsigned short family); |
673 | 673 | ||
674 | static inline int xfrm_route_forward(struct sk_buff *skb, unsigned short family) | 674 | static inline int xfrm_route_forward(struct sk_buff *skb, unsigned short family) |
@@ -831,7 +831,7 @@ struct xfrm_tunnel { | |||
831 | }; | 831 | }; |
832 | 832 | ||
833 | struct xfrm6_tunnel { | 833 | struct xfrm6_tunnel { |
834 | int (*handler)(struct sk_buff **pskb, unsigned int *nhoffp); | 834 | int (*handler)(struct sk_buff **pskb); |
835 | void (*err_handler)(struct sk_buff *skb, struct inet6_skb_parm *opt, | 835 | void (*err_handler)(struct sk_buff *skb, struct inet6_skb_parm *opt, |
836 | int type, int code, int offset, __u32 info); | 836 | int type, int code, int offset, __u32 info); |
837 | }; | 837 | }; |
@@ -866,10 +866,11 @@ extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); | |||
866 | extern int xfrm_init_state(struct xfrm_state *x); | 866 | extern int xfrm_init_state(struct xfrm_state *x); |
867 | extern int xfrm4_rcv(struct sk_buff *skb); | 867 | extern int xfrm4_rcv(struct sk_buff *skb); |
868 | extern int xfrm4_output(struct sk_buff *skb); | 868 | extern int xfrm4_output(struct sk_buff *skb); |
869 | extern int xfrm4_output_finish(struct sk_buff *skb); | ||
869 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); | 870 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); |
870 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); | 871 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); |
871 | extern int xfrm6_rcv_spi(struct sk_buff **pskb, unsigned int *nhoffp, u32 spi); | 872 | extern int xfrm6_rcv_spi(struct sk_buff **pskb, u32 spi); |
872 | extern int xfrm6_rcv(struct sk_buff **pskb, unsigned int *nhoffp); | 873 | extern int xfrm6_rcv(struct sk_buff **pskb); |
873 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler); | 874 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler); |
874 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler); | 875 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler); |
875 | extern u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); | 876 | extern u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); |
diff --git a/include/sound/wavefront.h b/include/sound/wavefront.h index 9e572aed2435..15d82e594b56 100644 --- a/include/sound/wavefront.h +++ b/include/sound/wavefront.h | |||
@@ -454,22 +454,22 @@ typedef struct wf_multisample { | |||
454 | } wavefront_multisample; | 454 | } wavefront_multisample; |
455 | 455 | ||
456 | typedef struct wf_alias { | 456 | typedef struct wf_alias { |
457 | s16 OriginalSample __attribute__ ((packed)); | 457 | s16 OriginalSample; |
458 | 458 | ||
459 | struct wf_sample_offset sampleStartOffset __attribute__ ((packed)); | 459 | struct wf_sample_offset sampleStartOffset; |
460 | struct wf_sample_offset loopStartOffset __attribute__ ((packed)); | 460 | struct wf_sample_offset loopStartOffset; |
461 | struct wf_sample_offset sampleEndOffset __attribute__ ((packed)); | 461 | struct wf_sample_offset sampleEndOffset; |
462 | struct wf_sample_offset loopEndOffset __attribute__ ((packed)); | 462 | struct wf_sample_offset loopEndOffset; |
463 | 463 | ||
464 | s16 FrequencyBias __attribute__ ((packed)); | 464 | s16 FrequencyBias; |
465 | 465 | ||
466 | u8 SampleResolution:2 __attribute__ ((packed)); | 466 | u8 SampleResolution:2; |
467 | u8 Unused1:1 __attribute__ ((packed)); | 467 | u8 Unused1:1; |
468 | u8 Loop:1 __attribute__ ((packed)); | 468 | u8 Loop:1; |
469 | u8 Bidirectional:1 __attribute__ ((packed)); | 469 | u8 Bidirectional:1; |
470 | u8 Unused2:1 __attribute__ ((packed)); | 470 | u8 Unused2:1; |
471 | u8 Reverse:1 __attribute__ ((packed)); | 471 | u8 Reverse:1; |
472 | u8 Unused3:1 __attribute__ ((packed)); | 472 | u8 Unused3:1; |
473 | 473 | ||
474 | /* This structure is meant to be padded only to 16 bits on their | 474 | /* This structure is meant to be padded only to 16 bits on their |
475 | original. Of course, whoever wrote their documentation didn't | 475 | original. Of course, whoever wrote their documentation didn't |
@@ -480,8 +480,8 @@ typedef struct wf_alias { | |||
480 | standard 16->32 bit issues. | 480 | standard 16->32 bit issues. |
481 | */ | 481 | */ |
482 | 482 | ||
483 | u8 sixteen_bit_padding __attribute__ ((packed)); | 483 | u8 sixteen_bit_padding; |
484 | } wavefront_alias; | 484 | } __attribute__((packed)) wavefront_alias; |
485 | 485 | ||
486 | typedef struct wf_drum { | 486 | typedef struct wf_drum { |
487 | u8 PatchNumber; | 487 | u8 PatchNumber; |