aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-01-11 16:42:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 22:01:11 -0500
commit92934bcbf96bc9dc931c40ca5f1a57685b7b813b (patch)
treeeb9690ca6b23b5603429a8b3d290d6ca2545bcaf /include/asm-x86_64
parent636aab5ce332d88a76362797a55804c7da643467 (diff)
[PATCH] i386/x86-64: Use input/output dependencies for bitops
Noticed by Andreas Schwab Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64')
-rw-r--r--include/asm-x86_64/bitops.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/asm-x86_64/bitops.h b/include/asm-x86_64/bitops.h
index a4d5d0909453..3638ffff87fd 100644
--- a/include/asm-x86_64/bitops.h
+++ b/include/asm-x86_64/bitops.h
@@ -29,7 +29,7 @@ static __inline__ void set_bit(int nr, volatile void * addr)
29{ 29{
30 __asm__ __volatile__( LOCK_PREFIX 30 __asm__ __volatile__( LOCK_PREFIX
31 "btsl %1,%0" 31 "btsl %1,%0"
32 :"=m" (ADDR) 32 :"+m" (ADDR)
33 :"dIr" (nr) : "memory"); 33 :"dIr" (nr) : "memory");
34} 34}
35 35
@@ -46,7 +46,7 @@ static __inline__ void __set_bit(int nr, volatile void * addr)
46{ 46{
47 __asm__ volatile( 47 __asm__ volatile(
48 "btsl %1,%0" 48 "btsl %1,%0"
49 :"=m" (ADDR) 49 :"+m" (ADDR)
50 :"dIr" (nr) : "memory"); 50 :"dIr" (nr) : "memory");
51} 51}
52 52
@@ -64,7 +64,7 @@ static __inline__ void clear_bit(int nr, volatile void * addr)
64{ 64{
65 __asm__ __volatile__( LOCK_PREFIX 65 __asm__ __volatile__( LOCK_PREFIX
66 "btrl %1,%0" 66 "btrl %1,%0"
67 :"=m" (ADDR) 67 :"+m" (ADDR)
68 :"dIr" (nr)); 68 :"dIr" (nr));
69} 69}
70 70
@@ -72,7 +72,7 @@ static __inline__ void __clear_bit(int nr, volatile void * addr)
72{ 72{
73 __asm__ __volatile__( 73 __asm__ __volatile__(
74 "btrl %1,%0" 74 "btrl %1,%0"
75 :"=m" (ADDR) 75 :"+m" (ADDR)
76 :"dIr" (nr)); 76 :"dIr" (nr));
77} 77}
78 78
@@ -92,7 +92,7 @@ static __inline__ void __change_bit(int nr, volatile void * addr)
92{ 92{
93 __asm__ __volatile__( 93 __asm__ __volatile__(
94 "btcl %1,%0" 94 "btcl %1,%0"
95 :"=m" (ADDR) 95 :"+m" (ADDR)
96 :"dIr" (nr)); 96 :"dIr" (nr));
97} 97}
98 98
@@ -109,7 +109,7 @@ static __inline__ void change_bit(int nr, volatile void * addr)
109{ 109{
110 __asm__ __volatile__( LOCK_PREFIX 110 __asm__ __volatile__( LOCK_PREFIX
111 "btcl %1,%0" 111 "btcl %1,%0"
112 :"=m" (ADDR) 112 :"+m" (ADDR)
113 :"dIr" (nr)); 113 :"dIr" (nr));
114} 114}
115 115
@@ -127,7 +127,7 @@ static __inline__ int test_and_set_bit(int nr, volatile void * addr)
127 127
128 __asm__ __volatile__( LOCK_PREFIX 128 __asm__ __volatile__( LOCK_PREFIX
129 "btsl %2,%1\n\tsbbl %0,%0" 129 "btsl %2,%1\n\tsbbl %0,%0"
130 :"=r" (oldbit),"=m" (ADDR) 130 :"=r" (oldbit),"+m" (ADDR)
131 :"dIr" (nr) : "memory"); 131 :"dIr" (nr) : "memory");
132 return oldbit; 132 return oldbit;
133} 133}
@@ -147,7 +147,7 @@ static __inline__ int __test_and_set_bit(int nr, volatile void * addr)
147 147
148 __asm__( 148 __asm__(
149 "btsl %2,%1\n\tsbbl %0,%0" 149 "btsl %2,%1\n\tsbbl %0,%0"
150 :"=r" (oldbit),"=m" (ADDR) 150 :"=r" (oldbit),"+m" (ADDR)
151 :"dIr" (nr)); 151 :"dIr" (nr));
152 return oldbit; 152 return oldbit;
153} 153}
@@ -166,7 +166,7 @@ static __inline__ int test_and_clear_bit(int nr, volatile void * addr)
166 166
167 __asm__ __volatile__( LOCK_PREFIX 167 __asm__ __volatile__( LOCK_PREFIX
168 "btrl %2,%1\n\tsbbl %0,%0" 168 "btrl %2,%1\n\tsbbl %0,%0"
169 :"=r" (oldbit),"=m" (ADDR) 169 :"=r" (oldbit),"+m" (ADDR)
170 :"dIr" (nr) : "memory"); 170 :"dIr" (nr) : "memory");
171 return oldbit; 171 return oldbit;
172} 172}
@@ -186,7 +186,7 @@ static __inline__ int __test_and_clear_bit(int nr, volatile void * addr)
186 186
187 __asm__( 187 __asm__(
188 "btrl %2,%1\n\tsbbl %0,%0" 188 "btrl %2,%1\n\tsbbl %0,%0"
189 :"=r" (oldbit),"=m" (ADDR) 189 :"=r" (oldbit),"+m" (ADDR)
190 :"dIr" (nr)); 190 :"dIr" (nr));
191 return oldbit; 191 return oldbit;
192} 192}
@@ -198,7 +198,7 @@ static __inline__ int __test_and_change_bit(int nr, volatile void * addr)
198 198
199 __asm__ __volatile__( 199 __asm__ __volatile__(
200 "btcl %2,%1\n\tsbbl %0,%0" 200 "btcl %2,%1\n\tsbbl %0,%0"
201 :"=r" (oldbit),"=m" (ADDR) 201 :"=r" (oldbit),"+m" (ADDR)
202 :"dIr" (nr) : "memory"); 202 :"dIr" (nr) : "memory");
203 return oldbit; 203 return oldbit;
204} 204}
@@ -217,7 +217,7 @@ static __inline__ int test_and_change_bit(int nr, volatile void * addr)
217 217
218 __asm__ __volatile__( LOCK_PREFIX 218 __asm__ __volatile__( LOCK_PREFIX
219 "btcl %2,%1\n\tsbbl %0,%0" 219 "btcl %2,%1\n\tsbbl %0,%0"
220 :"=r" (oldbit),"=m" (ADDR) 220 :"=r" (oldbit),"+m" (ADDR)
221 :"dIr" (nr) : "memory"); 221 :"dIr" (nr) : "memory");
222 return oldbit; 222 return oldbit;
223} 223}