diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/aclocal.h | 2 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 5 | ||||
-rw-r--r-- | include/asm-i386/atomic.h | 30 | ||||
-rw-r--r-- | include/asm-i386/futex.h | 10 | ||||
-rw-r--r-- | include/asm-i386/local.h | 14 | ||||
-rw-r--r-- | include/asm-i386/posix_types.h | 4 | ||||
-rw-r--r-- | include/asm-i386/rwlock.h | 4 | ||||
-rw-r--r-- | include/asm-i386/rwsem.h | 35 | ||||
-rw-r--r-- | include/asm-i386/semaphore.h | 8 | ||||
-rw-r--r-- | include/asm-i386/spinlock.h | 14 | ||||
-rw-r--r-- | include/asm-i386/thread_info.h | 7 | ||||
-rw-r--r-- | include/asm-powerpc/atomic.h | 32 | ||||
-rw-r--r-- | include/asm-powerpc/bitops.h | 16 | ||||
-rw-r--r-- | include/asm-powerpc/system.h | 16 | ||||
-rw-r--r-- | include/linux/blktrace_api.h | 5 | ||||
-rw-r--r-- | include/linux/netdevice.h | 8 | ||||
-rw-r--r-- | include/linux/skbuff.h | 5 | ||||
-rw-r--r-- | include/net/protocol.h | 2 | ||||
-rw-r--r-- | include/net/tcp.h | 1 |
19 files changed, 116 insertions, 102 deletions
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 7010fea26b48..a4d0e73d5aca 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -127,7 +127,7 @@ typedef u8 acpi_owner_id; | |||
127 | 127 | ||
128 | /* This Thread ID means that the mutex is not in use (unlocked) */ | 128 | /* This Thread ID means that the mutex is not in use (unlocked) */ |
129 | 129 | ||
130 | #define ACPI_MUTEX_NOT_ACQUIRED (u32) -1 | 130 | #define ACPI_MUTEX_NOT_ACQUIRED (acpi_thread_id) 0 |
131 | 131 | ||
132 | /* Table for the global mutexes */ | 132 | /* Table for the global mutexes */ |
133 | 133 | ||
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 3f853cabbd41..1cb51bf96ece 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <asm/acpi.h> | 59 | #include <asm/acpi.h> |
60 | #include <linux/slab.h> | 60 | #include <linux/slab.h> |
61 | #include <linux/spinlock_types.h> | 61 | #include <linux/spinlock_types.h> |
62 | #include <asm/current.h> | ||
62 | 63 | ||
63 | /* Host-dependent types and defines */ | 64 | /* Host-dependent types and defines */ |
64 | 65 | ||
@@ -100,8 +101,8 @@ | |||
100 | 101 | ||
101 | #define acpi_cpu_flags unsigned long | 102 | #define acpi_cpu_flags unsigned long |
102 | 103 | ||
103 | #define acpi_thread_id u32 | 104 | #define acpi_thread_id struct task_struct * |
104 | 105 | ||
105 | static inline acpi_thread_id acpi_os_get_thread_id(void) { return 0; } | 106 | static inline acpi_thread_id acpi_os_get_thread_id(void) { return current; } |
106 | 107 | ||
107 | #endif /* __ACLINUX_H__ */ | 108 | #endif /* __ACLINUX_H__ */ |
diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h index 4f061fa73794..51a166242522 100644 --- a/include/asm-i386/atomic.h +++ b/include/asm-i386/atomic.h | |||
@@ -46,8 +46,8 @@ static __inline__ void atomic_add(int i, atomic_t *v) | |||
46 | { | 46 | { |
47 | __asm__ __volatile__( | 47 | __asm__ __volatile__( |
48 | LOCK_PREFIX "addl %1,%0" | 48 | LOCK_PREFIX "addl %1,%0" |
49 | :"=m" (v->counter) | 49 | :"+m" (v->counter) |
50 | :"ir" (i), "m" (v->counter)); | 50 | :"ir" (i)); |
51 | } | 51 | } |
52 | 52 | ||
53 | /** | 53 | /** |
@@ -61,8 +61,8 @@ static __inline__ void atomic_sub(int i, atomic_t *v) | |||
61 | { | 61 | { |
62 | __asm__ __volatile__( | 62 | __asm__ __volatile__( |
63 | LOCK_PREFIX "subl %1,%0" | 63 | LOCK_PREFIX "subl %1,%0" |
64 | :"=m" (v->counter) | 64 | :"+m" (v->counter) |
65 | :"ir" (i), "m" (v->counter)); | 65 | :"ir" (i)); |
66 | } | 66 | } |
67 | 67 | ||
68 | /** | 68 | /** |
@@ -80,8 +80,8 @@ static __inline__ int atomic_sub_and_test(int i, atomic_t *v) | |||
80 | 80 | ||
81 | __asm__ __volatile__( | 81 | __asm__ __volatile__( |
82 | LOCK_PREFIX "subl %2,%0; sete %1" | 82 | LOCK_PREFIX "subl %2,%0; sete %1" |
83 | :"=m" (v->counter), "=qm" (c) | 83 | :"+m" (v->counter), "=qm" (c) |
84 | :"ir" (i), "m" (v->counter) : "memory"); | 84 | :"ir" (i) : "memory"); |
85 | return c; | 85 | return c; |
86 | } | 86 | } |
87 | 87 | ||
@@ -95,8 +95,7 @@ static __inline__ void atomic_inc(atomic_t *v) | |||
95 | { | 95 | { |
96 | __asm__ __volatile__( | 96 | __asm__ __volatile__( |
97 | LOCK_PREFIX "incl %0" | 97 | LOCK_PREFIX "incl %0" |
98 | :"=m" (v->counter) | 98 | :"+m" (v->counter)); |
99 | :"m" (v->counter)); | ||
100 | } | 99 | } |
101 | 100 | ||
102 | /** | 101 | /** |
@@ -109,8 +108,7 @@ static __inline__ void atomic_dec(atomic_t *v) | |||
109 | { | 108 | { |
110 | __asm__ __volatile__( | 109 | __asm__ __volatile__( |
111 | LOCK_PREFIX "decl %0" | 110 | LOCK_PREFIX "decl %0" |
112 | :"=m" (v->counter) | 111 | :"+m" (v->counter)); |
113 | :"m" (v->counter)); | ||
114 | } | 112 | } |
115 | 113 | ||
116 | /** | 114 | /** |
@@ -127,8 +125,8 @@ static __inline__ int atomic_dec_and_test(atomic_t *v) | |||
127 | 125 | ||
128 | __asm__ __volatile__( | 126 | __asm__ __volatile__( |
129 | LOCK_PREFIX "decl %0; sete %1" | 127 | LOCK_PREFIX "decl %0; sete %1" |
130 | :"=m" (v->counter), "=qm" (c) | 128 | :"+m" (v->counter), "=qm" (c) |
131 | :"m" (v->counter) : "memory"); | 129 | : : "memory"); |
132 | return c != 0; | 130 | return c != 0; |
133 | } | 131 | } |
134 | 132 | ||
@@ -146,8 +144,8 @@ static __inline__ int atomic_inc_and_test(atomic_t *v) | |||
146 | 144 | ||
147 | __asm__ __volatile__( | 145 | __asm__ __volatile__( |
148 | LOCK_PREFIX "incl %0; sete %1" | 146 | LOCK_PREFIX "incl %0; sete %1" |
149 | :"=m" (v->counter), "=qm" (c) | 147 | :"+m" (v->counter), "=qm" (c) |
150 | :"m" (v->counter) : "memory"); | 148 | : : "memory"); |
151 | return c != 0; | 149 | return c != 0; |
152 | } | 150 | } |
153 | 151 | ||
@@ -166,8 +164,8 @@ static __inline__ int atomic_add_negative(int i, atomic_t *v) | |||
166 | 164 | ||
167 | __asm__ __volatile__( | 165 | __asm__ __volatile__( |
168 | LOCK_PREFIX "addl %2,%0; sets %1" | 166 | LOCK_PREFIX "addl %2,%0; sets %1" |
169 | :"=m" (v->counter), "=qm" (c) | 167 | :"+m" (v->counter), "=qm" (c) |
170 | :"ir" (i), "m" (v->counter) : "memory"); | 168 | :"ir" (i) : "memory"); |
171 | return c; | 169 | return c; |
172 | } | 170 | } |
173 | 171 | ||
diff --git a/include/asm-i386/futex.h b/include/asm-i386/futex.h index 7b8ceefd010f..946d97cfea23 100644 --- a/include/asm-i386/futex.h +++ b/include/asm-i386/futex.h | |||
@@ -20,8 +20,8 @@ | |||
20 | .align 8\n\ | 20 | .align 8\n\ |
21 | .long 1b,3b\n\ | 21 | .long 1b,3b\n\ |
22 | .previous" \ | 22 | .previous" \ |
23 | : "=r" (oldval), "=r" (ret), "=m" (*uaddr) \ | 23 | : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \ |
24 | : "i" (-EFAULT), "m" (*uaddr), "0" (oparg), "1" (0)) | 24 | : "i" (-EFAULT), "0" (oparg), "1" (0)) |
25 | 25 | ||
26 | #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ | 26 | #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ |
27 | __asm__ __volatile ( \ | 27 | __asm__ __volatile ( \ |
@@ -38,9 +38,9 @@ | |||
38 | .align 8\n\ | 38 | .align 8\n\ |
39 | .long 1b,4b,2b,4b\n\ | 39 | .long 1b,4b,2b,4b\n\ |
40 | .previous" \ | 40 | .previous" \ |
41 | : "=&a" (oldval), "=&r" (ret), "=m" (*uaddr), \ | 41 | : "=&a" (oldval), "=&r" (ret), "+m" (*uaddr), \ |
42 | "=&r" (tem) \ | 42 | "=&r" (tem) \ |
43 | : "r" (oparg), "i" (-EFAULT), "m" (*uaddr), "1" (0)) | 43 | : "r" (oparg), "i" (-EFAULT), "1" (0)) |
44 | 44 | ||
45 | static inline int | 45 | static inline int |
46 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | 46 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) |
@@ -123,7 +123,7 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | |||
123 | " .long 1b,3b \n" | 123 | " .long 1b,3b \n" |
124 | " .previous \n" | 124 | " .previous \n" |
125 | 125 | ||
126 | : "=a" (oldval), "=m" (*uaddr) | 126 | : "=a" (oldval), "+m" (*uaddr) |
127 | : "i" (-EFAULT), "r" (newval), "0" (oldval) | 127 | : "i" (-EFAULT), "r" (newval), "0" (oldval) |
128 | : "memory" | 128 | : "memory" |
129 | ); | 129 | ); |
diff --git a/include/asm-i386/local.h b/include/asm-i386/local.h index 3b4998c51d08..12060e22f7e2 100644 --- a/include/asm-i386/local.h +++ b/include/asm-i386/local.h | |||
@@ -17,32 +17,30 @@ static __inline__ void local_inc(local_t *v) | |||
17 | { | 17 | { |
18 | __asm__ __volatile__( | 18 | __asm__ __volatile__( |
19 | "incl %0" | 19 | "incl %0" |
20 | :"=m" (v->counter) | 20 | :"+m" (v->counter)); |
21 | :"m" (v->counter)); | ||
22 | } | 21 | } |
23 | 22 | ||
24 | static __inline__ void local_dec(local_t *v) | 23 | static __inline__ void local_dec(local_t *v) |
25 | { | 24 | { |
26 | __asm__ __volatile__( | 25 | __asm__ __volatile__( |
27 | "decl %0" | 26 | "decl %0" |
28 | :"=m" (v->counter) | 27 | :"+m" (v->counter)); |
29 | :"m" (v->counter)); | ||
30 | } | 28 | } |
31 | 29 | ||
32 | static __inline__ void local_add(long i, local_t *v) | 30 | static __inline__ void local_add(long i, local_t *v) |
33 | { | 31 | { |
34 | __asm__ __volatile__( | 32 | __asm__ __volatile__( |
35 | "addl %1,%0" | 33 | "addl %1,%0" |
36 | :"=m" (v->counter) | 34 | :"+m" (v->counter) |
37 | :"ir" (i), "m" (v->counter)); | 35 | :"ir" (i)); |
38 | } | 36 | } |
39 | 37 | ||
40 | static __inline__ void local_sub(long i, local_t *v) | 38 | static __inline__ void local_sub(long i, local_t *v) |
41 | { | 39 | { |
42 | __asm__ __volatile__( | 40 | __asm__ __volatile__( |
43 | "subl %1,%0" | 41 | "subl %1,%0" |
44 | :"=m" (v->counter) | 42 | :"+m" (v->counter) |
45 | :"ir" (i), "m" (v->counter)); | 43 | :"ir" (i)); |
46 | } | 44 | } |
47 | 45 | ||
48 | /* On x86, these are no better than the atomic variants. */ | 46 | /* On x86, these are no better than the atomic variants. */ |
diff --git a/include/asm-i386/posix_types.h b/include/asm-i386/posix_types.h index 4e47ed059ad6..133e31e7dfde 100644 --- a/include/asm-i386/posix_types.h +++ b/include/asm-i386/posix_types.h | |||
@@ -51,12 +51,12 @@ typedef struct { | |||
51 | #undef __FD_SET | 51 | #undef __FD_SET |
52 | #define __FD_SET(fd,fdsetp) \ | 52 | #define __FD_SET(fd,fdsetp) \ |
53 | __asm__ __volatile__("btsl %1,%0": \ | 53 | __asm__ __volatile__("btsl %1,%0": \ |
54 | "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) | 54 | "+m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) |
55 | 55 | ||
56 | #undef __FD_CLR | 56 | #undef __FD_CLR |
57 | #define __FD_CLR(fd,fdsetp) \ | 57 | #define __FD_CLR(fd,fdsetp) \ |
58 | __asm__ __volatile__("btrl %1,%0": \ | 58 | __asm__ __volatile__("btrl %1,%0": \ |
59 | "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) | 59 | "+m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) |
60 | 60 | ||
61 | #undef __FD_ISSET | 61 | #undef __FD_ISSET |
62 | #define __FD_ISSET(fd,fdsetp) (__extension__ ({ \ | 62 | #define __FD_ISSET(fd,fdsetp) (__extension__ ({ \ |
diff --git a/include/asm-i386/rwlock.h b/include/asm-i386/rwlock.h index 94f00195d543..96b0bef2ea56 100644 --- a/include/asm-i386/rwlock.h +++ b/include/asm-i386/rwlock.h | |||
@@ -37,7 +37,7 @@ | |||
37 | "popl %%eax\n\t" \ | 37 | "popl %%eax\n\t" \ |
38 | "1:\n", \ | 38 | "1:\n", \ |
39 | "subl $1,%0\n\t", \ | 39 | "subl $1,%0\n\t", \ |
40 | "=m" (*(volatile int *)rw) : : "memory") | 40 | "+m" (*(volatile int *)rw) : : "memory") |
41 | 41 | ||
42 | #define __build_read_lock(rw, helper) do { \ | 42 | #define __build_read_lock(rw, helper) do { \ |
43 | if (__builtin_constant_p(rw)) \ | 43 | if (__builtin_constant_p(rw)) \ |
@@ -63,7 +63,7 @@ | |||
63 | "popl %%eax\n\t" \ | 63 | "popl %%eax\n\t" \ |
64 | "1:\n", \ | 64 | "1:\n", \ |
65 | "subl $" RW_LOCK_BIAS_STR ",%0\n\t", \ | 65 | "subl $" RW_LOCK_BIAS_STR ",%0\n\t", \ |
66 | "=m" (*(volatile int *)rw) : : "memory") | 66 | "+m" (*(volatile int *)rw) : : "memory") |
67 | 67 | ||
68 | #define __build_write_lock(rw, helper) do { \ | 68 | #define __build_write_lock(rw, helper) do { \ |
69 | if (__builtin_constant_p(rw)) \ | 69 | if (__builtin_constant_p(rw)) \ |
diff --git a/include/asm-i386/rwsem.h b/include/asm-i386/rwsem.h index 2f07601562e7..43113f5608eb 100644 --- a/include/asm-i386/rwsem.h +++ b/include/asm-i386/rwsem.h | |||
@@ -111,8 +111,8 @@ LOCK_PREFIX " incl (%%eax)\n\t" /* adds 0x00000001, returns the old value | |||
111 | " jmp 1b\n" | 111 | " jmp 1b\n" |
112 | LOCK_SECTION_END | 112 | LOCK_SECTION_END |
113 | "# ending down_read\n\t" | 113 | "# ending down_read\n\t" |
114 | : "=m"(sem->count) | 114 | : "+m" (sem->count) |
115 | : "a"(sem), "m"(sem->count) | 115 | : "a" (sem) |
116 | : "memory", "cc"); | 116 | : "memory", "cc"); |
117 | } | 117 | } |
118 | 118 | ||
@@ -133,8 +133,8 @@ LOCK_PREFIX " cmpxchgl %2,%0\n\t" | |||
133 | " jnz 1b\n\t" | 133 | " jnz 1b\n\t" |
134 | "2:\n\t" | 134 | "2:\n\t" |
135 | "# ending __down_read_trylock\n\t" | 135 | "# ending __down_read_trylock\n\t" |
136 | : "+m"(sem->count), "=&a"(result), "=&r"(tmp) | 136 | : "+m" (sem->count), "=&a" (result), "=&r" (tmp) |
137 | : "i"(RWSEM_ACTIVE_READ_BIAS) | 137 | : "i" (RWSEM_ACTIVE_READ_BIAS) |
138 | : "memory", "cc"); | 138 | : "memory", "cc"); |
139 | return result>=0 ? 1 : 0; | 139 | return result>=0 ? 1 : 0; |
140 | } | 140 | } |
@@ -161,8 +161,8 @@ LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the | |||
161 | " jmp 1b\n" | 161 | " jmp 1b\n" |
162 | LOCK_SECTION_END | 162 | LOCK_SECTION_END |
163 | "# ending down_write" | 163 | "# ending down_write" |
164 | : "=m"(sem->count), "=d"(tmp) | 164 | : "+m" (sem->count), "=d" (tmp) |
165 | : "a"(sem), "1"(tmp), "m"(sem->count) | 165 | : "a" (sem), "1" (tmp) |
166 | : "memory", "cc"); | 166 | : "memory", "cc"); |
167 | } | 167 | } |
168 | 168 | ||
@@ -205,8 +205,8 @@ LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old valu | |||
205 | " jmp 1b\n" | 205 | " jmp 1b\n" |
206 | LOCK_SECTION_END | 206 | LOCK_SECTION_END |
207 | "# ending __up_read\n" | 207 | "# ending __up_read\n" |
208 | : "=m"(sem->count), "=d"(tmp) | 208 | : "+m" (sem->count), "=d" (tmp) |
209 | : "a"(sem), "1"(tmp), "m"(sem->count) | 209 | : "a" (sem), "1" (tmp) |
210 | : "memory", "cc"); | 210 | : "memory", "cc"); |
211 | } | 211 | } |
212 | 212 | ||
@@ -231,8 +231,8 @@ LOCK_PREFIX " xaddl %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> | |||
231 | " jmp 1b\n" | 231 | " jmp 1b\n" |
232 | LOCK_SECTION_END | 232 | LOCK_SECTION_END |
233 | "# ending __up_write\n" | 233 | "# ending __up_write\n" |
234 | : "=m"(sem->count) | 234 | : "+m" (sem->count) |
235 | : "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS), "m"(sem->count) | 235 | : "a" (sem), "i" (-RWSEM_ACTIVE_WRITE_BIAS) |
236 | : "memory", "cc", "edx"); | 236 | : "memory", "cc", "edx"); |
237 | } | 237 | } |
238 | 238 | ||
@@ -256,8 +256,8 @@ LOCK_PREFIX " addl %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 0xYYYY0001 | |||
256 | " jmp 1b\n" | 256 | " jmp 1b\n" |
257 | LOCK_SECTION_END | 257 | LOCK_SECTION_END |
258 | "# ending __downgrade_write\n" | 258 | "# ending __downgrade_write\n" |
259 | : "=m"(sem->count) | 259 | : "+m" (sem->count) |
260 | : "a"(sem), "i"(-RWSEM_WAITING_BIAS), "m"(sem->count) | 260 | : "a" (sem), "i" (-RWSEM_WAITING_BIAS) |
261 | : "memory", "cc"); | 261 | : "memory", "cc"); |
262 | } | 262 | } |
263 | 263 | ||
@@ -268,8 +268,8 @@ static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem) | |||
268 | { | 268 | { |
269 | __asm__ __volatile__( | 269 | __asm__ __volatile__( |
270 | LOCK_PREFIX "addl %1,%0" | 270 | LOCK_PREFIX "addl %1,%0" |
271 | : "=m"(sem->count) | 271 | : "+m" (sem->count) |
272 | : "ir"(delta), "m"(sem->count)); | 272 | : "ir" (delta)); |
273 | } | 273 | } |
274 | 274 | ||
275 | /* | 275 | /* |
@@ -280,10 +280,9 @@ static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem) | |||
280 | int tmp = delta; | 280 | int tmp = delta; |
281 | 281 | ||
282 | __asm__ __volatile__( | 282 | __asm__ __volatile__( |
283 | LOCK_PREFIX "xadd %0,(%2)" | 283 | LOCK_PREFIX "xadd %0,%1" |
284 | : "+r"(tmp), "=m"(sem->count) | 284 | : "+r" (tmp), "+m" (sem->count) |
285 | : "r"(sem), "m"(sem->count) | 285 | : : "memory"); |
286 | : "memory"); | ||
287 | 286 | ||
288 | return tmp+delta; | 287 | return tmp+delta; |
289 | } | 288 | } |
diff --git a/include/asm-i386/semaphore.h b/include/asm-i386/semaphore.h index f7a0f310c524..d51e800acf29 100644 --- a/include/asm-i386/semaphore.h +++ b/include/asm-i386/semaphore.h | |||
@@ -107,7 +107,7 @@ static inline void down(struct semaphore * sem) | |||
107 | "call __down_failed\n\t" | 107 | "call __down_failed\n\t" |
108 | "jmp 1b\n" | 108 | "jmp 1b\n" |
109 | LOCK_SECTION_END | 109 | LOCK_SECTION_END |
110 | :"=m" (sem->count) | 110 | :"+m" (sem->count) |
111 | : | 111 | : |
112 | :"memory","ax"); | 112 | :"memory","ax"); |
113 | } | 113 | } |
@@ -132,7 +132,7 @@ static inline int down_interruptible(struct semaphore * sem) | |||
132 | "call __down_failed_interruptible\n\t" | 132 | "call __down_failed_interruptible\n\t" |
133 | "jmp 1b\n" | 133 | "jmp 1b\n" |
134 | LOCK_SECTION_END | 134 | LOCK_SECTION_END |
135 | :"=a" (result), "=m" (sem->count) | 135 | :"=a" (result), "+m" (sem->count) |
136 | : | 136 | : |
137 | :"memory"); | 137 | :"memory"); |
138 | return result; | 138 | return result; |
@@ -157,7 +157,7 @@ static inline int down_trylock(struct semaphore * sem) | |||
157 | "call __down_failed_trylock\n\t" | 157 | "call __down_failed_trylock\n\t" |
158 | "jmp 1b\n" | 158 | "jmp 1b\n" |
159 | LOCK_SECTION_END | 159 | LOCK_SECTION_END |
160 | :"=a" (result), "=m" (sem->count) | 160 | :"=a" (result), "+m" (sem->count) |
161 | : | 161 | : |
162 | :"memory"); | 162 | :"memory"); |
163 | return result; | 163 | return result; |
@@ -182,7 +182,7 @@ static inline void up(struct semaphore * sem) | |||
182 | "jmp 1b\n" | 182 | "jmp 1b\n" |
183 | LOCK_SECTION_END | 183 | LOCK_SECTION_END |
184 | ".subsection 0\n" | 184 | ".subsection 0\n" |
185 | :"=m" (sem->count) | 185 | :"+m" (sem->count) |
186 | : | 186 | : |
187 | :"memory","ax"); | 187 | :"memory","ax"); |
188 | } | 188 | } |
diff --git a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h index 87c40f830653..d816c62a7a1d 100644 --- a/include/asm-i386/spinlock.h +++ b/include/asm-i386/spinlock.h | |||
@@ -65,7 +65,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) | |||
65 | alternative_smp( | 65 | alternative_smp( |
66 | __raw_spin_lock_string, | 66 | __raw_spin_lock_string, |
67 | __raw_spin_lock_string_up, | 67 | __raw_spin_lock_string_up, |
68 | "=m" (lock->slock) : : "memory"); | 68 | "+m" (lock->slock) : : "memory"); |
69 | } | 69 | } |
70 | 70 | ||
71 | /* | 71 | /* |
@@ -79,7 +79,7 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long fla | |||
79 | alternative_smp( | 79 | alternative_smp( |
80 | __raw_spin_lock_string_flags, | 80 | __raw_spin_lock_string_flags, |
81 | __raw_spin_lock_string_up, | 81 | __raw_spin_lock_string_up, |
82 | "=m" (lock->slock) : "r" (flags) : "memory"); | 82 | "+m" (lock->slock) : "r" (flags) : "memory"); |
83 | } | 83 | } |
84 | #endif | 84 | #endif |
85 | 85 | ||
@@ -88,7 +88,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) | |||
88 | char oldval; | 88 | char oldval; |
89 | __asm__ __volatile__( | 89 | __asm__ __volatile__( |
90 | "xchgb %b0,%1" | 90 | "xchgb %b0,%1" |
91 | :"=q" (oldval), "=m" (lock->slock) | 91 | :"=q" (oldval), "+m" (lock->slock) |
92 | :"0" (0) : "memory"); | 92 | :"0" (0) : "memory"); |
93 | return oldval > 0; | 93 | return oldval > 0; |
94 | } | 94 | } |
@@ -104,7 +104,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) | |||
104 | 104 | ||
105 | #define __raw_spin_unlock_string \ | 105 | #define __raw_spin_unlock_string \ |
106 | "movb $1,%0" \ | 106 | "movb $1,%0" \ |
107 | :"=m" (lock->slock) : : "memory" | 107 | :"+m" (lock->slock) : : "memory" |
108 | 108 | ||
109 | 109 | ||
110 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) | 110 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) |
@@ -118,7 +118,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
118 | 118 | ||
119 | #define __raw_spin_unlock_string \ | 119 | #define __raw_spin_unlock_string \ |
120 | "xchgb %b0, %1" \ | 120 | "xchgb %b0, %1" \ |
121 | :"=q" (oldval), "=m" (lock->slock) \ | 121 | :"=q" (oldval), "+m" (lock->slock) \ |
122 | :"0" (oldval) : "memory" | 122 | :"0" (oldval) : "memory" |
123 | 123 | ||
124 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) | 124 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) |
@@ -199,13 +199,13 @@ static inline int __raw_write_trylock(raw_rwlock_t *lock) | |||
199 | 199 | ||
200 | static inline void __raw_read_unlock(raw_rwlock_t *rw) | 200 | static inline void __raw_read_unlock(raw_rwlock_t *rw) |
201 | { | 201 | { |
202 | asm volatile(LOCK_PREFIX "incl %0" :"=m" (rw->lock) : : "memory"); | 202 | asm volatile(LOCK_PREFIX "incl %0" :"+m" (rw->lock) : : "memory"); |
203 | } | 203 | } |
204 | 204 | ||
205 | static inline void __raw_write_unlock(raw_rwlock_t *rw) | 205 | static inline void __raw_write_unlock(raw_rwlock_t *rw) |
206 | { | 206 | { |
207 | asm volatile(LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ", %0" | 207 | asm volatile(LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ", %0" |
208 | : "=m" (rw->lock) : : "memory"); | 208 | : "+m" (rw->lock) : : "memory"); |
209 | } | 209 | } |
210 | 210 | ||
211 | #endif /* __ASM_SPINLOCK_H */ | 211 | #endif /* __ASM_SPINLOCK_H */ |
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 2833fa2c0dd0..54d6d7aea938 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -140,6 +140,8 @@ static inline struct thread_info *current_thread_info(void) | |||
140 | #define TIF_SECCOMP 8 /* secure computing */ | 140 | #define TIF_SECCOMP 8 /* secure computing */ |
141 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | 141 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ |
142 | #define TIF_MEMDIE 16 | 142 | #define TIF_MEMDIE 16 |
143 | #define TIF_DEBUG 17 /* uses debug registers */ | ||
144 | #define TIF_IO_BITMAP 18 /* uses I/O bitmap */ | ||
143 | 145 | ||
144 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 146 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
145 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 147 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
@@ -151,6 +153,8 @@ static inline struct thread_info *current_thread_info(void) | |||
151 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 153 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
152 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 154 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
153 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 155 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
156 | #define _TIF_DEBUG (1<<TIF_DEBUG) | ||
157 | #define _TIF_IO_BITMAP (1<<TIF_IO_BITMAP) | ||
154 | 158 | ||
155 | /* work to do on interrupt/exception return */ | 159 | /* work to do on interrupt/exception return */ |
156 | #define _TIF_WORK_MASK \ | 160 | #define _TIF_WORK_MASK \ |
@@ -159,6 +163,9 @@ static inline struct thread_info *current_thread_info(void) | |||
159 | /* work to do on any return to u-space */ | 163 | /* work to do on any return to u-space */ |
160 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) | 164 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) |
161 | 165 | ||
166 | /* flags to check in __switch_to() */ | ||
167 | #define _TIF_WORK_CTXSW (_TIF_DEBUG|_TIF_IO_BITMAP) | ||
168 | |||
162 | /* | 169 | /* |
163 | * Thread-synchronous status. | 170 | * Thread-synchronous status. |
164 | * | 171 | * |
diff --git a/include/asm-powerpc/atomic.h b/include/asm-powerpc/atomic.h index bb3c0ab7e667..53283e2540b3 100644 --- a/include/asm-powerpc/atomic.h +++ b/include/asm-powerpc/atomic.h | |||
@@ -27,8 +27,8 @@ static __inline__ void atomic_add(int a, atomic_t *v) | |||
27 | PPC405_ERR77(0,%3) | 27 | PPC405_ERR77(0,%3) |
28 | " stwcx. %0,0,%3 \n\ | 28 | " stwcx. %0,0,%3 \n\ |
29 | bne- 1b" | 29 | bne- 1b" |
30 | : "=&r" (t), "=m" (v->counter) | 30 | : "=&r" (t), "+m" (v->counter) |
31 | : "r" (a), "r" (&v->counter), "m" (v->counter) | 31 | : "r" (a), "r" (&v->counter) |
32 | : "cc"); | 32 | : "cc"); |
33 | } | 33 | } |
34 | 34 | ||
@@ -63,8 +63,8 @@ static __inline__ void atomic_sub(int a, atomic_t *v) | |||
63 | PPC405_ERR77(0,%3) | 63 | PPC405_ERR77(0,%3) |
64 | " stwcx. %0,0,%3 \n\ | 64 | " stwcx. %0,0,%3 \n\ |
65 | bne- 1b" | 65 | bne- 1b" |
66 | : "=&r" (t), "=m" (v->counter) | 66 | : "=&r" (t), "+m" (v->counter) |
67 | : "r" (a), "r" (&v->counter), "m" (v->counter) | 67 | : "r" (a), "r" (&v->counter) |
68 | : "cc"); | 68 | : "cc"); |
69 | } | 69 | } |
70 | 70 | ||
@@ -97,8 +97,8 @@ static __inline__ void atomic_inc(atomic_t *v) | |||
97 | PPC405_ERR77(0,%2) | 97 | PPC405_ERR77(0,%2) |
98 | " stwcx. %0,0,%2 \n\ | 98 | " stwcx. %0,0,%2 \n\ |
99 | bne- 1b" | 99 | bne- 1b" |
100 | : "=&r" (t), "=m" (v->counter) | 100 | : "=&r" (t), "+m" (v->counter) |
101 | : "r" (&v->counter), "m" (v->counter) | 101 | : "r" (&v->counter) |
102 | : "cc"); | 102 | : "cc"); |
103 | } | 103 | } |
104 | 104 | ||
@@ -141,8 +141,8 @@ static __inline__ void atomic_dec(atomic_t *v) | |||
141 | PPC405_ERR77(0,%2)\ | 141 | PPC405_ERR77(0,%2)\ |
142 | " stwcx. %0,0,%2\n\ | 142 | " stwcx. %0,0,%2\n\ |
143 | bne- 1b" | 143 | bne- 1b" |
144 | : "=&r" (t), "=m" (v->counter) | 144 | : "=&r" (t), "+m" (v->counter) |
145 | : "r" (&v->counter), "m" (v->counter) | 145 | : "r" (&v->counter) |
146 | : "cc"); | 146 | : "cc"); |
147 | } | 147 | } |
148 | 148 | ||
@@ -253,8 +253,8 @@ static __inline__ void atomic64_add(long a, atomic64_t *v) | |||
253 | add %0,%2,%0\n\ | 253 | add %0,%2,%0\n\ |
254 | stdcx. %0,0,%3 \n\ | 254 | stdcx. %0,0,%3 \n\ |
255 | bne- 1b" | 255 | bne- 1b" |
256 | : "=&r" (t), "=m" (v->counter) | 256 | : "=&r" (t), "+m" (v->counter) |
257 | : "r" (a), "r" (&v->counter), "m" (v->counter) | 257 | : "r" (a), "r" (&v->counter) |
258 | : "cc"); | 258 | : "cc"); |
259 | } | 259 | } |
260 | 260 | ||
@@ -287,8 +287,8 @@ static __inline__ void atomic64_sub(long a, atomic64_t *v) | |||
287 | subf %0,%2,%0\n\ | 287 | subf %0,%2,%0\n\ |
288 | stdcx. %0,0,%3 \n\ | 288 | stdcx. %0,0,%3 \n\ |
289 | bne- 1b" | 289 | bne- 1b" |
290 | : "=&r" (t), "=m" (v->counter) | 290 | : "=&r" (t), "+m" (v->counter) |
291 | : "r" (a), "r" (&v->counter), "m" (v->counter) | 291 | : "r" (a), "r" (&v->counter) |
292 | : "cc"); | 292 | : "cc"); |
293 | } | 293 | } |
294 | 294 | ||
@@ -319,8 +319,8 @@ static __inline__ void atomic64_inc(atomic64_t *v) | |||
319 | addic %0,%0,1\n\ | 319 | addic %0,%0,1\n\ |
320 | stdcx. %0,0,%2 \n\ | 320 | stdcx. %0,0,%2 \n\ |
321 | bne- 1b" | 321 | bne- 1b" |
322 | : "=&r" (t), "=m" (v->counter) | 322 | : "=&r" (t), "+m" (v->counter) |
323 | : "r" (&v->counter), "m" (v->counter) | 323 | : "r" (&v->counter) |
324 | : "cc"); | 324 | : "cc"); |
325 | } | 325 | } |
326 | 326 | ||
@@ -361,8 +361,8 @@ static __inline__ void atomic64_dec(atomic64_t *v) | |||
361 | addic %0,%0,-1\n\ | 361 | addic %0,%0,-1\n\ |
362 | stdcx. %0,0,%2\n\ | 362 | stdcx. %0,0,%2\n\ |
363 | bne- 1b" | 363 | bne- 1b" |
364 | : "=&r" (t), "=m" (v->counter) | 364 | : "=&r" (t), "+m" (v->counter) |
365 | : "r" (&v->counter), "m" (v->counter) | 365 | : "r" (&v->counter) |
366 | : "cc"); | 366 | : "cc"); |
367 | } | 367 | } |
368 | 368 | ||
diff --git a/include/asm-powerpc/bitops.h b/include/asm-powerpc/bitops.h index 76e2f08c3c83..c341063d0804 100644 --- a/include/asm-powerpc/bitops.h +++ b/include/asm-powerpc/bitops.h | |||
@@ -65,8 +65,8 @@ static __inline__ void set_bit(int nr, volatile unsigned long *addr) | |||
65 | PPC405_ERR77(0,%3) | 65 | PPC405_ERR77(0,%3) |
66 | PPC_STLCX "%0,0,%3\n" | 66 | PPC_STLCX "%0,0,%3\n" |
67 | "bne- 1b" | 67 | "bne- 1b" |
68 | : "=&r"(old), "=m"(*p) | 68 | : "=&r" (old), "+m" (*p) |
69 | : "r"(mask), "r"(p), "m"(*p) | 69 | : "r" (mask), "r" (p) |
70 | : "cc" ); | 70 | : "cc" ); |
71 | } | 71 | } |
72 | 72 | ||
@@ -82,8 +82,8 @@ static __inline__ void clear_bit(int nr, volatile unsigned long *addr) | |||
82 | PPC405_ERR77(0,%3) | 82 | PPC405_ERR77(0,%3) |
83 | PPC_STLCX "%0,0,%3\n" | 83 | PPC_STLCX "%0,0,%3\n" |
84 | "bne- 1b" | 84 | "bne- 1b" |
85 | : "=&r"(old), "=m"(*p) | 85 | : "=&r" (old), "+m" (*p) |
86 | : "r"(mask), "r"(p), "m"(*p) | 86 | : "r" (mask), "r" (p) |
87 | : "cc" ); | 87 | : "cc" ); |
88 | } | 88 | } |
89 | 89 | ||
@@ -99,8 +99,8 @@ static __inline__ void change_bit(int nr, volatile unsigned long *addr) | |||
99 | PPC405_ERR77(0,%3) | 99 | PPC405_ERR77(0,%3) |
100 | PPC_STLCX "%0,0,%3\n" | 100 | PPC_STLCX "%0,0,%3\n" |
101 | "bne- 1b" | 101 | "bne- 1b" |
102 | : "=&r"(old), "=m"(*p) | 102 | : "=&r" (old), "+m" (*p) |
103 | : "r"(mask), "r"(p), "m"(*p) | 103 | : "r" (mask), "r" (p) |
104 | : "cc" ); | 104 | : "cc" ); |
105 | } | 105 | } |
106 | 106 | ||
@@ -179,8 +179,8 @@ static __inline__ void set_bits(unsigned long mask, unsigned long *addr) | |||
179 | "or %0,%0,%2\n" | 179 | "or %0,%0,%2\n" |
180 | PPC_STLCX "%0,0,%3\n" | 180 | PPC_STLCX "%0,0,%3\n" |
181 | "bne- 1b" | 181 | "bne- 1b" |
182 | : "=&r" (old), "=m" (*addr) | 182 | : "=&r" (old), "+m" (*addr) |
183 | : "r" (mask), "r" (addr), "m" (*addr) | 183 | : "r" (mask), "r" (addr) |
184 | : "cc"); | 184 | : "cc"); |
185 | } | 185 | } |
186 | 186 | ||
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index d075725bf444..c6569516ba35 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -220,8 +220,8 @@ __xchg_u32(volatile void *p, unsigned long val) | |||
220 | " stwcx. %3,0,%2 \n\ | 220 | " stwcx. %3,0,%2 \n\ |
221 | bne- 1b" | 221 | bne- 1b" |
222 | ISYNC_ON_SMP | 222 | ISYNC_ON_SMP |
223 | : "=&r" (prev), "=m" (*(volatile unsigned int *)p) | 223 | : "=&r" (prev), "+m" (*(volatile unsigned int *)p) |
224 | : "r" (p), "r" (val), "m" (*(volatile unsigned int *)p) | 224 | : "r" (p), "r" (val) |
225 | : "cc", "memory"); | 225 | : "cc", "memory"); |
226 | 226 | ||
227 | return prev; | 227 | return prev; |
@@ -240,8 +240,8 @@ __xchg_u64(volatile void *p, unsigned long val) | |||
240 | " stdcx. %3,0,%2 \n\ | 240 | " stdcx. %3,0,%2 \n\ |
241 | bne- 1b" | 241 | bne- 1b" |
242 | ISYNC_ON_SMP | 242 | ISYNC_ON_SMP |
243 | : "=&r" (prev), "=m" (*(volatile unsigned long *)p) | 243 | : "=&r" (prev), "+m" (*(volatile unsigned long *)p) |
244 | : "r" (p), "r" (val), "m" (*(volatile unsigned long *)p) | 244 | : "r" (p), "r" (val) |
245 | : "cc", "memory"); | 245 | : "cc", "memory"); |
246 | 246 | ||
247 | return prev; | 247 | return prev; |
@@ -299,8 +299,8 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) | |||
299 | ISYNC_ON_SMP | 299 | ISYNC_ON_SMP |
300 | "\n\ | 300 | "\n\ |
301 | 2:" | 301 | 2:" |
302 | : "=&r" (prev), "=m" (*p) | 302 | : "=&r" (prev), "+m" (*p) |
303 | : "r" (p), "r" (old), "r" (new), "m" (*p) | 303 | : "r" (p), "r" (old), "r" (new) |
304 | : "cc", "memory"); | 304 | : "cc", "memory"); |
305 | 305 | ||
306 | return prev; | 306 | return prev; |
@@ -322,8 +322,8 @@ __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) | |||
322 | ISYNC_ON_SMP | 322 | ISYNC_ON_SMP |
323 | "\n\ | 323 | "\n\ |
324 | 2:" | 324 | 2:" |
325 | : "=&r" (prev), "=m" (*p) | 325 | : "=&r" (prev), "+m" (*p) |
326 | : "r" (p), "r" (old), "r" (new), "m" (*p) | 326 | : "r" (p), "r" (old), "r" (new) |
327 | : "cc", "memory"); | 327 | : "cc", "memory"); |
328 | 328 | ||
329 | return prev; | 329 | return prev; |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index a7e8cef73d15..7520cc1ff9e2 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -11,7 +11,7 @@ enum blktrace_cat { | |||
11 | BLK_TC_READ = 1 << 0, /* reads */ | 11 | BLK_TC_READ = 1 << 0, /* reads */ |
12 | BLK_TC_WRITE = 1 << 1, /* writes */ | 12 | BLK_TC_WRITE = 1 << 1, /* writes */ |
13 | BLK_TC_BARRIER = 1 << 2, /* barrier */ | 13 | BLK_TC_BARRIER = 1 << 2, /* barrier */ |
14 | BLK_TC_SYNC = 1 << 3, /* barrier */ | 14 | BLK_TC_SYNC = 1 << 3, /* sync IO */ |
15 | BLK_TC_QUEUE = 1 << 4, /* queueing/merging */ | 15 | BLK_TC_QUEUE = 1 << 4, /* queueing/merging */ |
16 | BLK_TC_REQUEUE = 1 << 5, /* requeueing */ | 16 | BLK_TC_REQUEUE = 1 << 5, /* requeueing */ |
17 | BLK_TC_ISSUE = 1 << 6, /* issue */ | 17 | BLK_TC_ISSUE = 1 << 6, /* issue */ |
@@ -19,6 +19,7 @@ enum blktrace_cat { | |||
19 | BLK_TC_FS = 1 << 8, /* fs requests */ | 19 | BLK_TC_FS = 1 << 8, /* fs requests */ |
20 | BLK_TC_PC = 1 << 9, /* pc requests */ | 20 | BLK_TC_PC = 1 << 9, /* pc requests */ |
21 | BLK_TC_NOTIFY = 1 << 10, /* special message */ | 21 | BLK_TC_NOTIFY = 1 << 10, /* special message */ |
22 | BLK_TC_AHEAD = 1 << 11, /* readahead */ | ||
22 | 23 | ||
23 | BLK_TC_END = 1 << 15, /* only 16-bits, reminder */ | 24 | BLK_TC_END = 1 << 15, /* only 16-bits, reminder */ |
24 | }; | 25 | }; |
@@ -147,7 +148,7 @@ static inline void blk_add_trace_rq(struct request_queue *q, struct request *rq, | |||
147 | u32 what) | 148 | u32 what) |
148 | { | 149 | { |
149 | struct blk_trace *bt = q->blk_trace; | 150 | struct blk_trace *bt = q->blk_trace; |
150 | int rw = rq->flags & 0x07; | 151 | int rw = rq->flags & 0x03; |
151 | 152 | ||
152 | if (likely(!bt)) | 153 | if (likely(!bt)) |
153 | return; | 154 | return; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 85f99f60deea..76cc099c8580 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -549,6 +549,7 @@ struct packet_type { | |||
549 | struct net_device *); | 549 | struct net_device *); |
550 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 550 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
551 | int features); | 551 | int features); |
552 | int (*gso_send_check)(struct sk_buff *skb); | ||
552 | void *af_packet_priv; | 553 | void *af_packet_priv; |
553 | struct list_head list; | 554 | struct list_head list; |
554 | }; | 555 | }; |
@@ -1001,13 +1002,14 @@ static inline int net_gso_ok(int features, int gso_type) | |||
1001 | 1002 | ||
1002 | static inline int skb_gso_ok(struct sk_buff *skb, int features) | 1003 | static inline int skb_gso_ok(struct sk_buff *skb, int features) |
1003 | { | 1004 | { |
1004 | return net_gso_ok(features, skb_shinfo(skb)->gso_size ? | 1005 | return net_gso_ok(features, skb_shinfo(skb)->gso_type); |
1005 | skb_shinfo(skb)->gso_type : 0); | ||
1006 | } | 1006 | } |
1007 | 1007 | ||
1008 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 1008 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) |
1009 | { | 1009 | { |
1010 | return !skb_gso_ok(skb, dev->features); | 1010 | return skb_is_gso(skb) && |
1011 | (!skb_gso_ok(skb, dev->features) || | ||
1012 | unlikely(skb->ip_summed != CHECKSUM_HW)); | ||
1011 | } | 1013 | } |
1012 | 1014 | ||
1013 | #endif /* __KERNEL__ */ | 1015 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 3597b4f14389..0bf31b83578c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1455,5 +1455,10 @@ static inline void skb_init_secmark(struct sk_buff *skb) | |||
1455 | { } | 1455 | { } |
1456 | #endif | 1456 | #endif |
1457 | 1457 | ||
1458 | static inline int skb_is_gso(const struct sk_buff *skb) | ||
1459 | { | ||
1460 | return skb_shinfo(skb)->gso_size; | ||
1461 | } | ||
1462 | |||
1458 | #endif /* __KERNEL__ */ | 1463 | #endif /* __KERNEL__ */ |
1459 | #endif /* _LINUX_SKBUFF_H */ | 1464 | #endif /* _LINUX_SKBUFF_H */ |
diff --git a/include/net/protocol.h b/include/net/protocol.h index a225d6371cb1..c643bce64e55 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h | |||
@@ -36,6 +36,7 @@ | |||
36 | struct net_protocol { | 36 | struct net_protocol { |
37 | int (*handler)(struct sk_buff *skb); | 37 | int (*handler)(struct sk_buff *skb); |
38 | void (*err_handler)(struct sk_buff *skb, u32 info); | 38 | void (*err_handler)(struct sk_buff *skb, u32 info); |
39 | int (*gso_send_check)(struct sk_buff *skb); | ||
39 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 40 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
40 | int features); | 41 | int features); |
41 | int no_policy; | 42 | int no_policy; |
@@ -51,6 +52,7 @@ struct inet6_protocol | |||
51 | int type, int code, int offset, | 52 | int type, int code, int offset, |
52 | __u32 info); | 53 | __u32 info); |
53 | 54 | ||
55 | int (*gso_send_check)(struct sk_buff *skb); | ||
54 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 56 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
55 | int features); | 57 | int features); |
56 | 58 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 3cd803b0d7a5..0720bddff1e9 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1086,6 +1086,7 @@ extern struct request_sock_ops tcp_request_sock_ops; | |||
1086 | 1086 | ||
1087 | extern int tcp_v4_destroy_sock(struct sock *sk); | 1087 | extern int tcp_v4_destroy_sock(struct sock *sk); |
1088 | 1088 | ||
1089 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); | ||
1089 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); | 1090 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); |
1090 | 1091 | ||
1091 | #ifdef CONFIG_PROC_FS | 1092 | #ifdef CONFIG_PROC_FS |