diff options
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/system.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index bc9739dff5e7..2a65ae637204 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -463,7 +463,7 @@ __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new, | |||
463 | return old; | 463 | return old; |
464 | } | 464 | } |
465 | 465 | ||
466 | #define cmpxchg(ptr,o,n) \ | 466 | #define cmpxchg(ptr, o, n) \ |
467 | ({ \ | 467 | ({ \ |
468 | __typeof__(*(ptr)) _o_ = (o); \ | 468 | __typeof__(*(ptr)) _o_ = (o); \ |
469 | __typeof__(*(ptr)) _n_ = (n); \ | 469 | __typeof__(*(ptr)) _n_ = (n); \ |
@@ -472,7 +472,7 @@ __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new, | |||
472 | }) | 472 | }) |
473 | 473 | ||
474 | 474 | ||
475 | #define cmpxchg_local(ptr,o,n) \ | 475 | #define cmpxchg_local(ptr, o, n) \ |
476 | ({ \ | 476 | ({ \ |
477 | __typeof__(*(ptr)) _o_ = (o); \ | 477 | __typeof__(*(ptr)) _o_ = (o); \ |
478 | __typeof__(*(ptr)) _n_ = (n); \ | 478 | __typeof__(*(ptr)) _n_ = (n); \ |
@@ -492,6 +492,20 @@ __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new, | |||
492 | */ | 492 | */ |
493 | #define NET_IP_ALIGN 0 | 493 | #define NET_IP_ALIGN 0 |
494 | #define NET_SKB_PAD L1_CACHE_BYTES | 494 | #define NET_SKB_PAD L1_CACHE_BYTES |
495 | |||
496 | #define cmpxchg64(ptr, o, n) \ | ||
497 | ({ \ | ||
498 | BUILD_BUG_ON(sizeof(*(ptr)) != 8); \ | ||
499 | cmpxchg((ptr), (o), (n)); \ | ||
500 | }) | ||
501 | #define cmpxchg64_local(ptr, o, n) \ | ||
502 | ({ \ | ||
503 | BUILD_BUG_ON(sizeof(*(ptr)) != 8); \ | ||
504 | cmpxchg_local((ptr), (o), (n)); \ | ||
505 | }) | ||
506 | #else | ||
507 | #include <asm-generic/cmpxchg-local.h> | ||
508 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
495 | #endif | 509 | #endif |
496 | 510 | ||
497 | #define arch_align_stack(x) (x) | 511 | #define arch_align_stack(x) (x) |