aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-07-27 13:36:54 -0400
committerTony Luck <tony.luck@intel.com>2005-07-27 13:36:54 -0400
commitc2834cf4746cf13501efc3489b1895bce58a4ccb (patch)
tree13614c2ed7ec156d8518fd5bff4e1c252fb05792 /include
parent05cb784c81a0fd1f97732156ea464bd392ce875a (diff)
parent9e566d8bd61f939b7f5d7d969f5b178571471cf9 (diff)
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/emergency-restart.h6
-rw-r--r--include/asm-arm/arch-s3c2410/regs-iis.h10
-rw-r--r--include/asm-arm/bitops.h4
-rw-r--r--include/asm-arm/emergency-restart.h6
-rw-r--r--include/asm-arm/locks.h36
-rw-r--r--include/asm-arm/spinlock.h53
-rw-r--r--include/asm-arm/system.h92
-rw-r--r--include/asm-arm26/emergency-restart.h6
-rw-r--r--include/asm-cris/emergency-restart.h6
-rw-r--r--include/asm-frv/emergency-restart.h6
-rw-r--r--include/asm-generic/emergency-restart.h9
-rw-r--r--include/asm-h8300/emergency-restart.h6
-rw-r--r--include/asm-i386/emergency-restart.h6
-rw-r--r--include/asm-i386/ptrace.h13
-rw-r--r--include/asm-ia64/emergency-restart.h6
-rw-r--r--include/asm-m32r/emergency-restart.h6
-rw-r--r--include/asm-m68k/emergency-restart.h6
-rw-r--r--include/asm-m68knommu/emergency-restart.h6
-rw-r--r--include/asm-mips/emergency-restart.h6
-rw-r--r--include/asm-parisc/emergency-restart.h6
-rw-r--r--include/asm-ppc/emergency-restart.h6
-rw-r--r--include/asm-ppc64/emergency-restart.h6
-rw-r--r--include/asm-s390/emergency-restart.h6
-rw-r--r--include/asm-sh/emergency-restart.h6
-rw-r--r--include/asm-sh64/emergency-restart.h6
-rw-r--r--include/asm-sparc/emergency-restart.h6
-rw-r--r--include/asm-sparc64/emergency-restart.h6
-rw-r--r--include/asm-um/emergency-restart.h6
-rw-r--r--include/asm-v850/emergency-restart.h6
-rw-r--r--include/asm-x86_64/emergency-restart.h6
-rw-r--r--include/asm-x86_64/ia32_unistd.h7
-rw-r--r--include/asm-x86_64/unistd.h10
-rw-r--r--include/asm-xtensa/emergency-restart.h6
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack.h2
-rw-r--r--include/linux/pci_ids.h11
-rw-r--r--include/linux/reboot.h16
-rw-r--r--include/scsi/scsi.h4
-rw-r--r--include/scsi/scsi_cmnd.h5
-rw-r--r--include/scsi/scsi_device.h3
-rw-r--r--include/scsi/scsi_host.h6
40 files changed, 343 insertions, 82 deletions
diff --git a/include/asm-alpha/emergency-restart.h b/include/asm-alpha/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-alpha/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-arm/arch-s3c2410/regs-iis.h b/include/asm-arm/arch-s3c2410/regs-iis.h
index 385b07d510da..fdd62e8cd6cb 100644
--- a/include/asm-arm/arch-s3c2410/regs-iis.h
+++ b/include/asm-arm/arch-s3c2410/regs-iis.h
@@ -15,6 +15,9 @@
15 * 12-03-2004 BJD Updated include protection 15 * 12-03-2004 BJD Updated include protection
16 * 07-03-2005 BJD Added FIFO size flags and S3C2440 MPLL 16 * 07-03-2005 BJD Added FIFO size flags and S3C2440 MPLL
17 * 05-04-2005 LCVR Added IISFCON definitions for the S3C2400 17 * 05-04-2005 LCVR Added IISFCON definitions for the S3C2400
18 * 18-07-2005 DA Change IISCON_MPLL to IISMOD_MPLL
19 * Correct IISMOD_256FS and IISMOD_384FS
20 * Add IISCON_PSCEN
18 */ 21 */
19 22
20#ifndef __ASM_ARCH_REGS_IIS_H 23#ifndef __ASM_ARCH_REGS_IIS_H
@@ -22,7 +25,6 @@
22 25
23#define S3C2410_IISCON (0x00) 26#define S3C2410_IISCON (0x00)
24 27
25#define S3C2440_IISCON_MPLL (1<<9)
26#define S3C2410_IISCON_LRINDEX (1<<8) 28#define S3C2410_IISCON_LRINDEX (1<<8)
27#define S3C2410_IISCON_TXFIFORDY (1<<7) 29#define S3C2410_IISCON_TXFIFORDY (1<<7)
28#define S3C2410_IISCON_RXFIFORDY (1<<6) 30#define S3C2410_IISCON_RXFIFORDY (1<<6)
@@ -30,10 +32,12 @@
30#define S3C2410_IISCON_RXDMAEN (1<<4) 32#define S3C2410_IISCON_RXDMAEN (1<<4)
31#define S3C2410_IISCON_TXIDLE (1<<3) 33#define S3C2410_IISCON_TXIDLE (1<<3)
32#define S3C2410_IISCON_RXIDLE (1<<2) 34#define S3C2410_IISCON_RXIDLE (1<<2)
35#define S3C2410_IISCON_PSCEN (1<<1)
33#define S3C2410_IISCON_IISEN (1<<0) 36#define S3C2410_IISCON_IISEN (1<<0)
34 37
35#define S3C2410_IISMOD (0x04) 38#define S3C2410_IISMOD (0x04)
36 39
40#define S3C2440_IISMOD_MPLL (1<<9)
37#define S3C2410_IISMOD_SLAVE (1<<8) 41#define S3C2410_IISMOD_SLAVE (1<<8)
38#define S3C2410_IISMOD_NOXFER (0<<6) 42#define S3C2410_IISMOD_NOXFER (0<<6)
39#define S3C2410_IISMOD_RXMODE (1<<6) 43#define S3C2410_IISMOD_RXMODE (1<<6)
@@ -46,8 +50,8 @@
46#define S3C2410_IISMOD_8BIT (0<<3) 50#define S3C2410_IISMOD_8BIT (0<<3)
47#define S3C2410_IISMOD_16BIT (1<<3) 51#define S3C2410_IISMOD_16BIT (1<<3)
48#define S3C2410_IISMOD_BITMASK (1<<3) 52#define S3C2410_IISMOD_BITMASK (1<<3)
49#define S3C2410_IISMOD_256FS (0<<1) 53#define S3C2410_IISMOD_256FS (0<<2)
50#define S3C2410_IISMOD_384FS (1<<1) 54#define S3C2410_IISMOD_384FS (1<<2)
51#define S3C2410_IISMOD_16FS (0<<0) 55#define S3C2410_IISMOD_16FS (0<<0)
52#define S3C2410_IISMOD_32FS (1<<0) 56#define S3C2410_IISMOD_32FS (1<<0)
53#define S3C2410_IISMOD_48FS (2<<0) 57#define S3C2410_IISMOD_48FS (2<<0)
diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h
index 4edd4dc40c5b..c1adc6b3e86d 100644
--- a/include/asm-arm/bitops.h
+++ b/include/asm-arm/bitops.h
@@ -21,8 +21,8 @@
21 21
22#include <asm/system.h> 22#include <asm/system.h>
23 23
24#define smp_mb__before_clear_bit() do { } while (0) 24#define smp_mb__before_clear_bit() mb()
25#define smp_mb__after_clear_bit() do { } while (0) 25#define smp_mb__after_clear_bit() mb()
26 26
27/* 27/*
28 * These functions are the basis of our bit ops. 28 * These functions are the basis of our bit ops.
diff --git a/include/asm-arm/emergency-restart.h b/include/asm-arm/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-arm/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-arm/locks.h b/include/asm-arm/locks.h
index 9cb33fcc06c1..f08dc8447913 100644
--- a/include/asm-arm/locks.h
+++ b/include/asm-arm/locks.h
@@ -28,7 +28,8 @@
28" blmi " #fail \ 28" blmi " #fail \
29 : \ 29 : \
30 : "r" (ptr), "I" (1) \ 30 : "r" (ptr), "I" (1) \
31 : "ip", "lr", "cc", "memory"); \ 31 : "ip", "lr", "cc"); \
32 smp_mb(); \
32 }) 33 })
33 34
34#define __down_op_ret(ptr,fail) \ 35#define __down_op_ret(ptr,fail) \
@@ -48,12 +49,14 @@
48" mov %0, ip" \ 49" mov %0, ip" \
49 : "=&r" (ret) \ 50 : "=&r" (ret) \
50 : "r" (ptr), "I" (1) \ 51 : "r" (ptr), "I" (1) \
51 : "ip", "lr", "cc", "memory"); \ 52 : "ip", "lr", "cc"); \
53 smp_mb(); \
52 ret; \ 54 ret; \
53 }) 55 })
54 56
55#define __up_op(ptr,wake) \ 57#define __up_op(ptr,wake) \
56 ({ \ 58 ({ \
59 smp_mb(); \
57 __asm__ __volatile__( \ 60 __asm__ __volatile__( \
58 "@ up_op\n" \ 61 "@ up_op\n" \
59"1: ldrex lr, [%0]\n" \ 62"1: ldrex lr, [%0]\n" \
@@ -66,7 +69,7 @@
66" blle " #wake \ 69" blle " #wake \
67 : \ 70 : \
68 : "r" (ptr), "I" (1) \ 71 : "r" (ptr), "I" (1) \
69 : "ip", "lr", "cc", "memory"); \ 72 : "ip", "lr", "cc"); \
70 }) 73 })
71 74
72/* 75/*
@@ -92,11 +95,13 @@
92" blne " #fail \ 95" blne " #fail \
93 : \ 96 : \
94 : "r" (ptr), "I" (RW_LOCK_BIAS) \ 97 : "r" (ptr), "I" (RW_LOCK_BIAS) \
95 : "ip", "lr", "cc", "memory"); \ 98 : "ip", "lr", "cc"); \
99 smp_mb(); \
96 }) 100 })
97 101
98#define __up_op_write(ptr,wake) \ 102#define __up_op_write(ptr,wake) \
99 ({ \ 103 ({ \
104 smp_mb(); \
100 __asm__ __volatile__( \ 105 __asm__ __volatile__( \
101 "@ up_op_read\n" \ 106 "@ up_op_read\n" \
102"1: ldrex lr, [%0]\n" \ 107"1: ldrex lr, [%0]\n" \
@@ -108,7 +113,7 @@
108" blcs " #wake \ 113" blcs " #wake \
109 : \ 114 : \
110 : "r" (ptr), "I" (RW_LOCK_BIAS) \ 115 : "r" (ptr), "I" (RW_LOCK_BIAS) \
111 : "ip", "lr", "cc", "memory"); \ 116 : "ip", "lr", "cc"); \
112 }) 117 })
113 118
114#define __down_op_read(ptr,fail) \ 119#define __down_op_read(ptr,fail) \
@@ -116,6 +121,7 @@
116 121
117#define __up_op_read(ptr,wake) \ 122#define __up_op_read(ptr,wake) \
118 ({ \ 123 ({ \
124 smp_mb(); \
119 __asm__ __volatile__( \ 125 __asm__ __volatile__( \
120 "@ up_op_read\n" \ 126 "@ up_op_read\n" \
121"1: ldrex lr, [%0]\n" \ 127"1: ldrex lr, [%0]\n" \
@@ -128,7 +134,7 @@
128" bleq " #wake \ 134" bleq " #wake \
129 : \ 135 : \
130 : "r" (ptr), "I" (1) \ 136 : "r" (ptr), "I" (1) \
131 : "ip", "lr", "cc", "memory"); \ 137 : "ip", "lr", "cc"); \
132 }) 138 })
133 139
134#else 140#else
@@ -148,7 +154,8 @@
148" blmi " #fail \ 154" blmi " #fail \
149 : \ 155 : \
150 : "r" (ptr), "I" (1) \ 156 : "r" (ptr), "I" (1) \
151 : "ip", "lr", "cc", "memory"); \ 157 : "ip", "lr", "cc"); \
158 smp_mb(); \
152 }) 159 })
153 160
154#define __down_op_ret(ptr,fail) \ 161#define __down_op_ret(ptr,fail) \
@@ -169,12 +176,14 @@
169" mov %0, ip" \ 176" mov %0, ip" \
170 : "=&r" (ret) \ 177 : "=&r" (ret) \
171 : "r" (ptr), "I" (1) \ 178 : "r" (ptr), "I" (1) \
172 : "ip", "lr", "cc", "memory"); \ 179 : "ip", "lr", "cc"); \
180 smp_mb(); \
173 ret; \ 181 ret; \
174 }) 182 })
175 183
176#define __up_op(ptr,wake) \ 184#define __up_op(ptr,wake) \
177 ({ \ 185 ({ \
186 smp_mb(); \
178 __asm__ __volatile__( \ 187 __asm__ __volatile__( \
179 "@ up_op\n" \ 188 "@ up_op\n" \
180" mrs ip, cpsr\n" \ 189" mrs ip, cpsr\n" \
@@ -188,7 +197,7 @@
188" blle " #wake \ 197" blle " #wake \
189 : \ 198 : \
190 : "r" (ptr), "I" (1) \ 199 : "r" (ptr), "I" (1) \
191 : "ip", "lr", "cc", "memory"); \ 200 : "ip", "lr", "cc"); \
192 }) 201 })
193 202
194/* 203/*
@@ -215,7 +224,8 @@
215" blne " #fail \ 224" blne " #fail \
216 : \ 225 : \
217 : "r" (ptr), "I" (RW_LOCK_BIAS) \ 226 : "r" (ptr), "I" (RW_LOCK_BIAS) \
218 : "ip", "lr", "cc", "memory"); \ 227 : "ip", "lr", "cc"); \
228 smp_mb(); \
219 }) 229 })
220 230
221#define __up_op_write(ptr,wake) \ 231#define __up_op_write(ptr,wake) \
@@ -233,7 +243,8 @@
233" blcs " #wake \ 243" blcs " #wake \
234 : \ 244 : \
235 : "r" (ptr), "I" (RW_LOCK_BIAS) \ 245 : "r" (ptr), "I" (RW_LOCK_BIAS) \
236 : "ip", "lr", "cc", "memory"); \ 246 : "ip", "lr", "cc"); \
247 smp_mb(); \
237 }) 248 })
238 249
239#define __down_op_read(ptr,fail) \ 250#define __down_op_read(ptr,fail) \
@@ -241,6 +252,7 @@
241 252
242#define __up_op_read(ptr,wake) \ 253#define __up_op_read(ptr,wake) \
243 ({ \ 254 ({ \
255 smp_mb(); \
244 __asm__ __volatile__( \ 256 __asm__ __volatile__( \
245 "@ up_op_read\n" \ 257 "@ up_op_read\n" \
246" mrs ip, cpsr\n" \ 258" mrs ip, cpsr\n" \
@@ -254,7 +266,7 @@
254" bleq " #wake \ 266" bleq " #wake \
255 : \ 267 : \
256 : "r" (ptr), "I" (1) \ 268 : "r" (ptr), "I" (1) \
257 : "ip", "lr", "cc", "memory"); \ 269 : "ip", "lr", "cc"); \
258 }) 270 })
259 271
260#endif 272#endif
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h
index 9705d5eec94c..1f906d09b688 100644
--- a/include/asm-arm/spinlock.h
+++ b/include/asm-arm/spinlock.h
@@ -8,9 +8,10 @@
8/* 8/*
9 * ARMv6 Spin-locking. 9 * ARMv6 Spin-locking.
10 * 10 *
11 * We (exclusively) read the old value, and decrement it. If it 11 * We exclusively read the old value. If it is zero, we may have
12 * hits zero, we may have won the lock, so we try (exclusively) 12 * won the lock, so we try exclusively storing it. A memory barrier
13 * storing it. 13 * is required after we get a lock, and before we release it, because
14 * V6 CPUs are assumed to have weakly ordered memory.
14 * 15 *
15 * Unlocked value: 0 16 * Unlocked value: 0
16 * Locked value: 1 17 * Locked value: 1
@@ -41,7 +42,9 @@ static inline void _raw_spin_lock(spinlock_t *lock)
41" bne 1b" 42" bne 1b"
42 : "=&r" (tmp) 43 : "=&r" (tmp)
43 : "r" (&lock->lock), "r" (1) 44 : "r" (&lock->lock), "r" (1)
44 : "cc", "memory"); 45 : "cc");
46
47 smp_mb();
45} 48}
46 49
47static inline int _raw_spin_trylock(spinlock_t *lock) 50static inline int _raw_spin_trylock(spinlock_t *lock)
@@ -54,18 +57,25 @@ static inline int _raw_spin_trylock(spinlock_t *lock)
54" strexeq %0, %2, [%1]" 57" strexeq %0, %2, [%1]"
55 : "=&r" (tmp) 58 : "=&r" (tmp)
56 : "r" (&lock->lock), "r" (1) 59 : "r" (&lock->lock), "r" (1)
57 : "cc", "memory"); 60 : "cc");
58 61
59 return tmp == 0; 62 if (tmp == 0) {
63 smp_mb();
64 return 1;
65 } else {
66 return 0;
67 }
60} 68}
61 69
62static inline void _raw_spin_unlock(spinlock_t *lock) 70static inline void _raw_spin_unlock(spinlock_t *lock)
63{ 71{
72 smp_mb();
73
64 __asm__ __volatile__( 74 __asm__ __volatile__(
65" str %1, [%0]" 75" str %1, [%0]"
66 : 76 :
67 : "r" (&lock->lock), "r" (0) 77 : "r" (&lock->lock), "r" (0)
68 : "cc", "memory"); 78 : "cc");
69} 79}
70 80
71/* 81/*
@@ -98,7 +108,9 @@ static inline void _raw_write_lock(rwlock_t *rw)
98" bne 1b" 108" bne 1b"
99 : "=&r" (tmp) 109 : "=&r" (tmp)
100 : "r" (&rw->lock), "r" (0x80000000) 110 : "r" (&rw->lock), "r" (0x80000000)
101 : "cc", "memory"); 111 : "cc");
112
113 smp_mb();
102} 114}
103 115
104static inline int _raw_write_trylock(rwlock_t *rw) 116static inline int _raw_write_trylock(rwlock_t *rw)
@@ -111,18 +123,25 @@ static inline int _raw_write_trylock(rwlock_t *rw)
111" strexeq %0, %2, [%1]" 123" strexeq %0, %2, [%1]"
112 : "=&r" (tmp) 124 : "=&r" (tmp)
113 : "r" (&rw->lock), "r" (0x80000000) 125 : "r" (&rw->lock), "r" (0x80000000)
114 : "cc", "memory"); 126 : "cc");
115 127
116 return tmp == 0; 128 if (tmp == 0) {
129 smp_mb();
130 return 1;
131 } else {
132 return 0;
133 }
117} 134}
118 135
119static inline void _raw_write_unlock(rwlock_t *rw) 136static inline void _raw_write_unlock(rwlock_t *rw)
120{ 137{
138 smp_mb();
139
121 __asm__ __volatile__( 140 __asm__ __volatile__(
122 "str %1, [%0]" 141 "str %1, [%0]"
123 : 142 :
124 : "r" (&rw->lock), "r" (0) 143 : "r" (&rw->lock), "r" (0)
125 : "cc", "memory"); 144 : "cc");
126} 145}
127 146
128/* 147/*
@@ -149,13 +168,17 @@ static inline void _raw_read_lock(rwlock_t *rw)
149" bmi 1b" 168" bmi 1b"
150 : "=&r" (tmp), "=&r" (tmp2) 169 : "=&r" (tmp), "=&r" (tmp2)
151 : "r" (&rw->lock) 170 : "r" (&rw->lock)
152 : "cc", "memory"); 171 : "cc");
172
173 smp_mb();
153} 174}
154 175
155static inline void _raw_read_unlock(rwlock_t *rw) 176static inline void _raw_read_unlock(rwlock_t *rw)
156{ 177{
157 unsigned long tmp, tmp2; 178 unsigned long tmp, tmp2;
158 179
180 smp_mb();
181
159 __asm__ __volatile__( 182 __asm__ __volatile__(
160"1: ldrex %0, [%2]\n" 183"1: ldrex %0, [%2]\n"
161" sub %0, %0, #1\n" 184" sub %0, %0, #1\n"
@@ -164,7 +187,7 @@ static inline void _raw_read_unlock(rwlock_t *rw)
164" bne 1b" 187" bne 1b"
165 : "=&r" (tmp), "=&r" (tmp2) 188 : "=&r" (tmp), "=&r" (tmp2)
166 : "r" (&rw->lock) 189 : "r" (&rw->lock)
167 : "cc", "memory"); 190 : "cc");
168} 191}
169 192
170#define _raw_read_trylock(lock) generic_raw_read_trylock(lock) 193#define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 2f44b2044214..8efa4ebdcacb 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -139,7 +139,12 @@ extern unsigned int user_debug;
139#define vectors_high() (0) 139#define vectors_high() (0)
140#endif 140#endif
141 141
142#if __LINUX_ARM_ARCH__ >= 6
143#define mb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \
144 : : "r" (0) : "memory")
145#else
142#define mb() __asm__ __volatile__ ("" : : : "memory") 146#define mb() __asm__ __volatile__ ("" : : : "memory")
147#endif
143#define rmb() mb() 148#define rmb() mb()
144#define wmb() mb() 149#define wmb() mb()
145#define read_barrier_depends() do { } while(0) 150#define read_barrier_depends() do { } while(0)
@@ -323,12 +328,8 @@ do { \
323 * NOTE that this solution won't work on an SMP system, so explcitly 328 * NOTE that this solution won't work on an SMP system, so explcitly
324 * forbid it here. 329 * forbid it here.
325 */ 330 */
326#ifdef CONFIG_SMP
327#error SMP is not supported on SA1100/SA110
328#else
329#define swp_is_buggy 331#define swp_is_buggy
330#endif 332#endif
331#endif
332 333
333static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) 334static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
334{ 335{
@@ -337,35 +338,68 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
337#ifdef swp_is_buggy 338#ifdef swp_is_buggy
338 unsigned long flags; 339 unsigned long flags;
339#endif 340#endif
341#if __LINUX_ARM_ARCH__ >= 6
342 unsigned int tmp;
343#endif
340 344
341 switch (size) { 345 switch (size) {
342#ifdef swp_is_buggy 346#if __LINUX_ARM_ARCH__ >= 6
343 case 1: 347 case 1:
344 local_irq_save(flags); 348 asm volatile("@ __xchg1\n"
345 ret = *(volatile unsigned char *)ptr; 349 "1: ldrexb %0, [%3]\n"
346 *(volatile unsigned char *)ptr = x; 350 " strexb %1, %2, [%3]\n"
347 local_irq_restore(flags); 351 " teq %1, #0\n"
348 break; 352 " bne 1b"
349 353 : "=&r" (ret), "=&r" (tmp)
350 case 4: 354 : "r" (x), "r" (ptr)
351 local_irq_save(flags); 355 : "memory", "cc");
352 ret = *(volatile unsigned long *)ptr; 356 break;
353 *(volatile unsigned long *)ptr = x; 357 case 4:
354 local_irq_restore(flags); 358 asm volatile("@ __xchg4\n"
355 break; 359 "1: ldrex %0, [%3]\n"
360 " strex %1, %2, [%3]\n"
361 " teq %1, #0\n"
362 " bne 1b"
363 : "=&r" (ret), "=&r" (tmp)
364 : "r" (x), "r" (ptr)
365 : "memory", "cc");
366 break;
367#elif defined(swp_is_buggy)
368#ifdef CONFIG_SMP
369#error SMP is not supported on this platform
370#endif
371 case 1:
372 local_irq_save(flags);
373 ret = *(volatile unsigned char *)ptr;
374 *(volatile unsigned char *)ptr = x;
375 local_irq_restore(flags);
376 break;
377
378 case 4:
379 local_irq_save(flags);
380 ret = *(volatile unsigned long *)ptr;
381 *(volatile unsigned long *)ptr = x;
382 local_irq_restore(flags);
383 break;
356#else 384#else
357 case 1: __asm__ __volatile__ ("swpb %0, %1, [%2]" 385 case 1:
358 : "=&r" (ret) 386 asm volatile("@ __xchg1\n"
359 : "r" (x), "r" (ptr) 387 " swpb %0, %1, [%2]"
360 : "memory", "cc"); 388 : "=&r" (ret)
361 break; 389 : "r" (x), "r" (ptr)
362 case 4: __asm__ __volatile__ ("swp %0, %1, [%2]" 390 : "memory", "cc");
363 : "=&r" (ret) 391 break;
364 : "r" (x), "r" (ptr) 392 case 4:
365 : "memory", "cc"); 393 asm volatile("@ __xchg4\n"
366 break; 394 " swp %0, %1, [%2]"
395 : "=&r" (ret)
396 : "r" (x), "r" (ptr)
397 : "memory", "cc");
398 break;
367#endif 399#endif
368 default: __bad_xchg(ptr, size), ret = 0; 400 default:
401 __bad_xchg(ptr, size), ret = 0;
402 break;
369 } 403 }
370 404
371 return ret; 405 return ret;
diff --git a/include/asm-arm26/emergency-restart.h b/include/asm-arm26/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-arm26/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-cris/emergency-restart.h b/include/asm-cris/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-cris/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-frv/emergency-restart.h b/include/asm-frv/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-frv/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-generic/emergency-restart.h b/include/asm-generic/emergency-restart.h
new file mode 100644
index 000000000000..0d68a1eae985
--- /dev/null
+++ b/include/asm-generic/emergency-restart.h
@@ -0,0 +1,9 @@
1#ifndef _ASM_GENERIC_EMERGENCY_RESTART_H
2#define _ASM_GENERIC_EMERGENCY_RESTART_H
3
4static inline void machine_emergency_restart(void)
5{
6 machine_restart(NULL);
7}
8
9#endif /* _ASM_GENERIC_EMERGENCY_RESTART_H */
diff --git a/include/asm-h8300/emergency-restart.h b/include/asm-h8300/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-h8300/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-i386/emergency-restart.h b/include/asm-i386/emergency-restart.h
new file mode 100644
index 000000000000..680c39563345
--- /dev/null
+++ b/include/asm-i386/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4extern void machine_emergency_restart(void);
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h
index eef9f93870d4..b926cb4f4cfd 100644
--- a/include/asm-i386/ptrace.h
+++ b/include/asm-i386/ptrace.h
@@ -57,14 +57,21 @@ struct pt_regs {
57#ifdef __KERNEL__ 57#ifdef __KERNEL__
58struct task_struct; 58struct task_struct;
59extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); 59extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code);
60#define user_mode(regs) (3 & (regs)->xcs) 60
61#define user_mode_vm(regs) ((VM_MASK & (regs)->eflags) || user_mode(regs)) 61static inline int user_mode(struct pt_regs *regs)
62{
63 return (regs->xcs & 3) != 0;
64}
65static inline int user_mode_vm(struct pt_regs *regs)
66{
67 return ((regs->xcs & 3) | (regs->eflags & VM_MASK)) != 0;
68}
62#define instruction_pointer(regs) ((regs)->eip) 69#define instruction_pointer(regs) ((regs)->eip)
63#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) 70#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER)
64extern unsigned long profile_pc(struct pt_regs *regs); 71extern unsigned long profile_pc(struct pt_regs *regs);
65#else 72#else
66#define profile_pc(regs) instruction_pointer(regs) 73#define profile_pc(regs) instruction_pointer(regs)
67#endif 74#endif
68#endif 75#endif /* __KERNEL__ */
69 76
70#endif 77#endif
diff --git a/include/asm-ia64/emergency-restart.h b/include/asm-ia64/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-ia64/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-m32r/emergency-restart.h b/include/asm-m32r/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-m32r/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-m68k/emergency-restart.h b/include/asm-m68k/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-m68k/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-m68knommu/emergency-restart.h b/include/asm-m68knommu/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-m68knommu/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-mips/emergency-restart.h b/include/asm-mips/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-mips/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-parisc/emergency-restart.h b/include/asm-parisc/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-parisc/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-ppc/emergency-restart.h b/include/asm-ppc/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-ppc/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-ppc64/emergency-restart.h b/include/asm-ppc64/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-ppc64/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-s390/emergency-restart.h b/include/asm-s390/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-s390/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-sh/emergency-restart.h b/include/asm-sh/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-sh/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-sh64/emergency-restart.h b/include/asm-sh64/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-sh64/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-sparc/emergency-restart.h b/include/asm-sparc/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-sparc/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-sparc64/emergency-restart.h b/include/asm-sparc64/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-sparc64/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-um/emergency-restart.h b/include/asm-um/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-um/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-v850/emergency-restart.h b/include/asm-v850/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-v850/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-x86_64/emergency-restart.h b/include/asm-x86_64/emergency-restart.h
new file mode 100644
index 000000000000..680c39563345
--- /dev/null
+++ b/include/asm-x86_64/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4extern void machine_emergency_restart(void);
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h
index f3b7111cf33d..d5166ec3868d 100644
--- a/include/asm-x86_64/ia32_unistd.h
+++ b/include/asm-x86_64/ia32_unistd.h
@@ -294,7 +294,12 @@
294#define __NR_ia32_add_key 286 294#define __NR_ia32_add_key 286
295#define __NR_ia32_request_key 287 295#define __NR_ia32_request_key 287
296#define __NR_ia32_keyctl 288 296#define __NR_ia32_keyctl 288
297#define __NR_ia32_ioprio_set 289
298#define __NR_ia32_ioprio_get 290
299#define __NR_ia32_inotify_init 291
300#define __NR_ia32_inotify_add_watch 292
301#define __NR_ia32_inotify_rm_watch 293
297 302
298#define IA32_NR_syscalls 290 /* must be > than biggest syscall! */ 303#define IA32_NR_syscalls 294 /* must be > than biggest syscall! */
299 304
300#endif /* _ASM_X86_64_IA32_UNISTD_H_ */ 305#endif /* _ASM_X86_64_IA32_UNISTD_H_ */
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
index 6560439a83e4..11ba931cf82f 100644
--- a/include/asm-x86_64/unistd.h
+++ b/include/asm-x86_64/unistd.h
@@ -565,8 +565,14 @@ __SYSCALL(__NR_keyctl, sys_keyctl)
565__SYSCALL(__NR_ioprio_set, sys_ioprio_set) 565__SYSCALL(__NR_ioprio_set, sys_ioprio_set)
566#define __NR_ioprio_get 252 566#define __NR_ioprio_get 252
567__SYSCALL(__NR_ioprio_get, sys_ioprio_get) 567__SYSCALL(__NR_ioprio_get, sys_ioprio_get)
568 568#define __NR_inotify_init 253
569#define __NR_syscall_max __NR_ioprio_get 569__SYSCALL(__NR_inotify_init, sys_inotify_init)
570#define __NR_inotify_add_watch 254
571__SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch)
572#define __NR_inotify_rm_watch 255
573__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
574
575#define __NR_syscall_max __NR_inotify_rm_watch
570#ifndef __NO_STUBS 576#ifndef __NO_STUBS
571 577
572/* user-visible error numbers are in the range -1 - -4095 */ 578/* user-visible error numbers are in the range -1 - -4095 */
diff --git a/include/asm-xtensa/emergency-restart.h b/include/asm-xtensa/emergency-restart.h
new file mode 100644
index 000000000000..108d8c48e42e
--- /dev/null
+++ b/include/asm-xtensa/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h
index f8da7ddeff3a..08fe5f7d14a0 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -239,7 +239,7 @@ ip_conntrack_get(const struct sk_buff *skb, enum ip_conntrack_info *ctinfo)
239} 239}
240 240
241/* decrement reference count on a conntrack */ 241/* decrement reference count on a conntrack */
242extern inline void ip_conntrack_put(struct ip_conntrack *ct); 242extern void ip_conntrack_put(struct ip_conntrack *ct);
243 243
244/* call to create an explicit dependency on ip_conntrack. */ 244/* call to create an explicit dependency on ip_conntrack. */
245extern void need_ip_conntrack(void); 245extern void need_ip_conntrack(void);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 9a28b312eeb4..d2ad2c4f835a 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -911,6 +911,15 @@
911#define PCI_DEVICE_ID_QLOGIC_ISP1022 0x1022 911#define PCI_DEVICE_ID_QLOGIC_ISP1022 0x1022
912#define PCI_DEVICE_ID_QLOGIC_ISP2100 0x2100 912#define PCI_DEVICE_ID_QLOGIC_ISP2100 0x2100
913#define PCI_DEVICE_ID_QLOGIC_ISP2200 0x2200 913#define PCI_DEVICE_ID_QLOGIC_ISP2200 0x2200
914#define PCI_DEVICE_ID_QLOGIC_ISP2300 0x2300
915#define PCI_DEVICE_ID_QLOGIC_ISP2312 0x2312
916#define PCI_DEVICE_ID_QLOGIC_ISP2322 0x2322
917#define PCI_DEVICE_ID_QLOGIC_ISP6312 0x6312
918#define PCI_DEVICE_ID_QLOGIC_ISP6322 0x6322
919#define PCI_DEVICE_ID_QLOGIC_ISP2422 0x2422
920#define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432
921#define PCI_DEVICE_ID_QLOGIC_ISP2512 0x2512
922#define PCI_DEVICE_ID_QLOGIC_ISP2522 0x2522
914 923
915#define PCI_VENDOR_ID_CYRIX 0x1078 924#define PCI_VENDOR_ID_CYRIX 0x1078
916#define PCI_DEVICE_ID_CYRIX_5510 0x0000 925#define PCI_DEVICE_ID_CYRIX_5510 0x0000
@@ -2098,6 +2107,8 @@
2098#define PCI_DEVICE_ID_TIGON3_5721 0x1659 2107#define PCI_DEVICE_ID_TIGON3_5721 0x1659
2099#define PCI_DEVICE_ID_TIGON3_5705M 0x165d 2108#define PCI_DEVICE_ID_TIGON3_5705M 0x165d
2100#define PCI_DEVICE_ID_TIGON3_5705M_2 0x165e 2109#define PCI_DEVICE_ID_TIGON3_5705M_2 0x165e
2110#define PCI_DEVICE_ID_TIGON3_5780 0x166a
2111#define PCI_DEVICE_ID_TIGON3_5780S 0x166b
2101#define PCI_DEVICE_ID_TIGON3_5705F 0x166e 2112#define PCI_DEVICE_ID_TIGON3_5705F 0x166e
2102#define PCI_DEVICE_ID_TIGON3_5750 0x1676 2113#define PCI_DEVICE_ID_TIGON3_5750 0x1676
2103#define PCI_DEVICE_ID_TIGON3_5751 0x1677 2114#define PCI_DEVICE_ID_TIGON3_5751 0x1677
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index 2d4dd23168dd..3b3266ff1a95 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -55,6 +55,22 @@ extern void machine_shutdown(void);
55struct pt_regs; 55struct pt_regs;
56extern void machine_crash_shutdown(struct pt_regs *); 56extern void machine_crash_shutdown(struct pt_regs *);
57 57
58/*
59 * Architecture independent implemenations of sys_reboot commands.
60 */
61
62extern void kernel_restart(char *cmd);
63extern void kernel_halt(void);
64extern void kernel_power_off(void);
65extern void kernel_kexec(void);
66
67/*
68 * Emergency restart, callable from an interrupt handler.
69 */
70
71extern void emergency_restart(void);
72#include <asm/emergency-restart.h>
73
58#endif 74#endif
59 75
60#endif /* _LINUX_REBOOT_H */ 76#endif /* _LINUX_REBOOT_H */
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 1fb233741513..b361172b576c 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -28,7 +28,7 @@ extern const unsigned char scsi_command_size[8];
28 * SCSI device types 28 * SCSI device types
29 */ 29 */
30 30
31#define MAX_SCSI_DEVICE_CODE 14 31#define MAX_SCSI_DEVICE_CODE 15
32extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE]; 32extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
33 33
34/* 34/*
@@ -211,8 +211,8 @@ static inline int scsi_status_is_good(int status)
211 * - treated as TYPE_DISK */ 211 * - treated as TYPE_DISK */
212#define TYPE_MEDIUM_CHANGER 0x08 212#define TYPE_MEDIUM_CHANGER 0x08
213#define TYPE_COMM 0x09 /* Communications device */ 213#define TYPE_COMM 0x09 /* Communications device */
214#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */
215#define TYPE_RAID 0x0c 214#define TYPE_RAID 0x0c
215#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */
216#define TYPE_RBC 0x0e 216#define TYPE_RBC 0x0e
217#define TYPE_NO_LUN 0x7f 217#define TYPE_NO_LUN 0x7f
218 218
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 07f5c699eaa7..9957f16dcc5d 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -31,14 +31,11 @@ struct scsi_cmnd {
31 int sc_magic; 31 int sc_magic;
32 32
33 struct scsi_device *device; 33 struct scsi_device *device;
34 unsigned short state;
35 unsigned short owner;
36 struct scsi_request *sc_request; 34 struct scsi_request *sc_request;
37 35
38 struct list_head list; /* scsi_cmnd participates in queue lists */ 36 struct list_head list; /* scsi_cmnd participates in queue lists */
39 37
40 struct list_head eh_entry; /* entry for the host eh_cmd_q */ 38 struct list_head eh_entry; /* entry for the host eh_cmd_q */
41 int eh_state; /* Used for state tracking in error handlr */
42 int eh_eflags; /* Used by error handlr */ 39 int eh_eflags; /* Used by error handlr */
43 void (*done) (struct scsi_cmnd *); /* Mid-level done function */ 40 void (*done) (struct scsi_cmnd *); /* Mid-level done function */
44 41
@@ -80,8 +77,6 @@ struct scsi_cmnd {
80 * sense info */ 77 * sense info */
81 unsigned short use_sg; /* Number of pieces of scatter-gather */ 78 unsigned short use_sg; /* Number of pieces of scatter-gather */
82 unsigned short sglist_len; /* size of malloc'd scatter-gather list */ 79 unsigned short sglist_len; /* size of malloc'd scatter-gather list */
83 unsigned short abort_reason; /* If the mid-level code requests an
84 * abort, this is the reason. */
85 unsigned bufflen; /* Size of data buffer */ 80 unsigned bufflen; /* Size of data buffer */
86 void *buffer; /* Data buffer */ 81 void *buffer; /* Data buffer */
87 82
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 63c91dd85ca1..835af8ecbb7c 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -9,7 +9,7 @@
9struct request_queue; 9struct request_queue;
10struct scsi_cmnd; 10struct scsi_cmnd;
11struct scsi_mode_data; 11struct scsi_mode_data;
12 12struct scsi_lun;
13 13
14/* 14/*
15 * sdev state: If you alter this, you also need to alter scsi_sysfs.c 15 * sdev state: If you alter this, you also need to alter scsi_sysfs.c
@@ -243,6 +243,7 @@ extern void scsi_target_reap(struct scsi_target *);
243extern void scsi_target_block(struct device *); 243extern void scsi_target_block(struct device *);
244extern void scsi_target_unblock(struct device *); 244extern void scsi_target_unblock(struct device *);
245extern void scsi_remove_target(struct device *); 245extern void scsi_remove_target(struct device *);
246extern void int_to_scsilun(unsigned int, struct scsi_lun *);
246extern const char *scsi_device_state_name(enum scsi_device_state); 247extern const char *scsi_device_state_name(enum scsi_device_state);
247extern int scsi_is_sdev_device(const struct device *); 248extern int scsi_is_sdev_device(const struct device *);
248extern int scsi_is_target_device(const struct device *); 249extern int scsi_is_target_device(const struct device *);
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index db9914adeac9..81d5234f6771 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -641,12 +641,6 @@ static inline void scsi_assign_lock(struct Scsi_Host *shost, spinlock_t *lock)
641 shost->host_lock = lock; 641 shost->host_lock = lock;
642} 642}
643 643
644static inline void scsi_set_device(struct Scsi_Host *shost,
645 struct device *dev)
646{
647 shost->shost_gendev.parent = dev;
648}
649
650static inline struct device *scsi_get_device(struct Scsi_Host *shost) 644static inline struct device *scsi_get_device(struct Scsi_Host *shost)
651{ 645{
652 return shost->shost_gendev.parent; 646 return shost->shost_gendev.parent;