diff options
author | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
commit | 64e47488c913ac704d465a6af86a26786d1412a5 (patch) | |
tree | d3b0148592963dcde26e4bb35ddfec8b1eaf8e23 /include/asm-ppc64/system.h | |
parent | 4a35a46bf1cda4737c428380d1db5d15e2590d18 (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) |
Merge linux-2.6 with linux-acpi-2.6
Diffstat (limited to 'include/asm-ppc64/system.h')
-rw-r--r-- | include/asm-ppc64/system.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h index b9e1835351e9..c0396428cc3c 100644 --- a/include/asm-ppc64/system.h +++ b/include/asm-ppc64/system.h | |||
@@ -158,7 +158,7 @@ static inline int __is_processor(unsigned long pv) | |||
158 | * is more like most of the other architectures. | 158 | * is more like most of the other architectures. |
159 | */ | 159 | */ |
160 | static __inline__ unsigned long | 160 | static __inline__ unsigned long |
161 | __xchg_u32(volatile int *m, unsigned long val) | 161 | __xchg_u32(volatile unsigned int *m, unsigned long val) |
162 | { | 162 | { |
163 | unsigned long dummy; | 163 | unsigned long dummy; |
164 | 164 | ||
@@ -200,7 +200,7 @@ __xchg_u64(volatile long *m, unsigned long val) | |||
200 | extern void __xchg_called_with_bad_pointer(void); | 200 | extern void __xchg_called_with_bad_pointer(void); |
201 | 201 | ||
202 | static __inline__ unsigned long | 202 | static __inline__ unsigned long |
203 | __xchg(volatile void *ptr, unsigned long x, int size) | 203 | __xchg(volatile void *ptr, unsigned long x, unsigned int size) |
204 | { | 204 | { |
205 | switch (size) { | 205 | switch (size) { |
206 | case 4: | 206 | case 4: |
@@ -223,7 +223,7 @@ __xchg(volatile void *ptr, unsigned long x, int size) | |||
223 | #define __HAVE_ARCH_CMPXCHG 1 | 223 | #define __HAVE_ARCH_CMPXCHG 1 |
224 | 224 | ||
225 | static __inline__ unsigned long | 225 | static __inline__ unsigned long |
226 | __cmpxchg_u32(volatile int *p, int old, int new) | 226 | __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) |
227 | { | 227 | { |
228 | unsigned int prev; | 228 | unsigned int prev; |
229 | 229 | ||
@@ -271,7 +271,8 @@ __cmpxchg_u64(volatile long *p, unsigned long old, unsigned long new) | |||
271 | extern void __cmpxchg_called_with_bad_pointer(void); | 271 | extern void __cmpxchg_called_with_bad_pointer(void); |
272 | 272 | ||
273 | static __inline__ unsigned long | 273 | static __inline__ unsigned long |
274 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | 274 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, |
275 | unsigned int size) | ||
275 | { | 276 | { |
276 | switch (size) { | 277 | switch (size) { |
277 | case 4: | 278 | case 4: |
@@ -283,13 +284,9 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
283 | return old; | 284 | return old; |
284 | } | 285 | } |
285 | 286 | ||
286 | #define cmpxchg(ptr,o,n) \ | 287 | #define cmpxchg(ptr,o,n)\ |
287 | ({ \ | 288 | ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ |
288 | __typeof__(*(ptr)) _o_ = (o); \ | 289 | (unsigned long)(n),sizeof(*(ptr)))) |
289 | __typeof__(*(ptr)) _n_ = (n); \ | ||
290 | (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \ | ||
291 | (unsigned long)_n_, sizeof(*(ptr))); \ | ||
292 | }) | ||
293 | 290 | ||
294 | /* | 291 | /* |
295 | * We handle most unaligned accesses in hardware. On the other hand | 292 | * We handle most unaligned accesses in hardware. On the other hand |