]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/parisc/include/asm/cmpxchg.h
parisc: Add native high-resolution sched_clock() implementation
[karo-tx-linux.git] / arch / parisc / include / asm / cmpxchg.h
index 0a90b965cccbefe172be5dde879b5035b4589685..7ada309008073ac62021942709107f526a76a11f 100644 (file)
@@ -52,8 +52,7 @@ extern void __cmpxchg_called_with_bad_pointer(void);
 /* __cmpxchg_u32/u64 defined in arch/parisc/lib/bitops.c */
 extern unsigned long __cmpxchg_u32(volatile unsigned int *m, unsigned int old,
                                   unsigned int new_);
-extern unsigned long __cmpxchg_u64(volatile unsigned long *ptr,
-                                  unsigned long old, unsigned long new_);
+extern u64 __cmpxchg_u64(volatile u64 *ptr, u64 old, u64 new_);
 
 /* don't worry...optimizer will get rid of most of this */
 static inline unsigned long
@@ -61,7 +60,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
 {
        switch (size) {
 #ifdef CONFIG_64BIT
-       case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
+       case 8: return __cmpxchg_u64((u64 *)ptr, old, new_);
 #endif
        case 4: return __cmpxchg_u32((unsigned int *)ptr,
                                     (unsigned int)old, (unsigned int)new_);
@@ -86,7 +85,7 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr,
 {
        switch (size) {
 #ifdef CONFIG_64BIT
-       case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
+       case 8: return __cmpxchg_u64((u64 *)ptr, old, new_);
 #endif
        case 4: return __cmpxchg_u32(ptr, old, new_);
        default:
@@ -111,4 +110,6 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr,
 #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
 #endif
 
+#define cmpxchg64(ptr, o, n) __cmpxchg_u64(ptr, o, n)
+
 #endif /* _ASM_PARISC_CMPXCHG_H_ */