aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-04-28 00:44:08 -0400
committerPaul Mackerras <paulus@samba.org>2008-04-29 01:57:34 -0400
commitdd18434ff0b7d9b9ad3d596985fc84b329d2f9a8 (patch)
tree075067cc4390d186cef962098fae2e11d34c5bef /include/asm-powerpc
parent745a14cc264b1832c638e41812e0cb04328b2db1 (diff)
[POWERPC] Use __always_inline for xchg* and cmpxchg*
This changes the definitions of the xchg and cmpxchg families of functions in include/asm-powerpc/system.h to be marked __always_inline rather than __inline__. The reason for doing this is that we rely on the compiler inlining them in order to eliminate the references to __xchg_called_with_bad_pointer and __cmpxchg_called_with_bad_pointer, which are deliberately left undefined. Thus this change will enable us to make the inline keyword be just a hint rather than a directive. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/system.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h
index fab1674b31b6..2b6559a6d113 100644
--- a/include/asm-powerpc/system.h
+++ b/include/asm-powerpc/system.h
@@ -204,7 +204,7 @@ extern int powersave_nap; /* set if nap mode can be used in idle loop */
204 * Changes the memory location '*ptr' to be val and returns 204 * Changes the memory location '*ptr' to be val and returns
205 * the previous value stored there. 205 * the previous value stored there.
206 */ 206 */
207static __inline__ unsigned long 207static __always_inline unsigned long
208__xchg_u32(volatile void *p, unsigned long val) 208__xchg_u32(volatile void *p, unsigned long val)
209{ 209{
210 unsigned long prev; 210 unsigned long prev;
@@ -229,7 +229,7 @@ __xchg_u32(volatile void *p, unsigned long val)
229 * Changes the memory location '*ptr' to be val and returns 229 * Changes the memory location '*ptr' to be val and returns
230 * the previous value stored there. 230 * the previous value stored there.
231 */ 231 */
232static __inline__ unsigned long 232static __always_inline unsigned long
233__xchg_u32_local(volatile void *p, unsigned long val) 233__xchg_u32_local(volatile void *p, unsigned long val)
234{ 234{
235 unsigned long prev; 235 unsigned long prev;
@@ -247,7 +247,7 @@ __xchg_u32_local(volatile void *p, unsigned long val)
247} 247}
248 248
249#ifdef CONFIG_PPC64 249#ifdef CONFIG_PPC64
250static __inline__ unsigned long 250static __always_inline unsigned long
251__xchg_u64(volatile void *p, unsigned long val) 251__xchg_u64(volatile void *p, unsigned long val)
252{ 252{
253 unsigned long prev; 253 unsigned long prev;
@@ -266,7 +266,7 @@ __xchg_u64(volatile void *p, unsigned long val)
266 return prev; 266 return prev;
267} 267}
268 268
269static __inline__ unsigned long 269static __always_inline unsigned long
270__xchg_u64_local(volatile void *p, unsigned long val) 270__xchg_u64_local(volatile void *p, unsigned long val)
271{ 271{
272 unsigned long prev; 272 unsigned long prev;
@@ -290,7 +290,7 @@ __xchg_u64_local(volatile void *p, unsigned long val)
290 */ 290 */
291extern void __xchg_called_with_bad_pointer(void); 291extern void __xchg_called_with_bad_pointer(void);
292 292
293static __inline__ unsigned long 293static __always_inline unsigned long
294__xchg(volatile void *ptr, unsigned long x, unsigned int size) 294__xchg(volatile void *ptr, unsigned long x, unsigned int size)
295{ 295{
296 switch (size) { 296 switch (size) {
@@ -305,7 +305,7 @@ __xchg(volatile void *ptr, unsigned long x, unsigned int size)
305 return x; 305 return x;
306} 306}
307 307
308static __inline__ unsigned long 308static __always_inline unsigned long
309__xchg_local(volatile void *ptr, unsigned long x, unsigned int size) 309__xchg_local(volatile void *ptr, unsigned long x, unsigned int size)
310{ 310{
311 switch (size) { 311 switch (size) {
@@ -338,7 +338,7 @@ __xchg_local(volatile void *ptr, unsigned long x, unsigned int size)
338 */ 338 */
339#define __HAVE_ARCH_CMPXCHG 1 339#define __HAVE_ARCH_CMPXCHG 1
340 340
341static __inline__ unsigned long 341static __always_inline unsigned long
342__cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) 342__cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new)
343{ 343{
344 unsigned int prev; 344 unsigned int prev;
@@ -361,7 +361,7 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new)
361 return prev; 361 return prev;
362} 362}
363 363
364static __inline__ unsigned long 364static __always_inline unsigned long
365__cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, 365__cmpxchg_u32_local(volatile unsigned int *p, unsigned long old,
366 unsigned long new) 366 unsigned long new)
367{ 367{
@@ -384,7 +384,7 @@ __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old,
384} 384}
385 385
386#ifdef CONFIG_PPC64 386#ifdef CONFIG_PPC64
387static __inline__ unsigned long 387static __always_inline unsigned long
388__cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) 388__cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new)
389{ 389{
390 unsigned long prev; 390 unsigned long prev;
@@ -406,7 +406,7 @@ __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new)
406 return prev; 406 return prev;
407} 407}
408 408
409static __inline__ unsigned long 409static __always_inline unsigned long
410__cmpxchg_u64_local(volatile unsigned long *p, unsigned long old, 410__cmpxchg_u64_local(volatile unsigned long *p, unsigned long old,
411 unsigned long new) 411 unsigned long new)
412{ 412{
@@ -432,7 +432,7 @@ __cmpxchg_u64_local(volatile unsigned long *p, unsigned long old,
432 if something tries to do an invalid cmpxchg(). */ 432 if something tries to do an invalid cmpxchg(). */
433extern void __cmpxchg_called_with_bad_pointer(void); 433extern void __cmpxchg_called_with_bad_pointer(void);
434 434
435static __inline__ unsigned long 435static __always_inline unsigned long
436__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, 436__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new,
437 unsigned int size) 437 unsigned int size)
438{ 438{
@@ -448,7 +448,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new,
448 return old; 448 return old;
449} 449}
450 450
451static __inline__ unsigned long 451static __always_inline unsigned long
452__cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new, 452__cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new,
453 unsigned int size) 453 unsigned int size)
454{ 454{