staging: unisys: get rid of uiscmpxchg64
authorBenjamin Romer <benjamin.romer@unisys.com>
Tue, 5 Aug 2014 18:57:49 +0000 (14:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Aug 2014 19:23:07 +0000 (12:23 -0700)
Remove the uiscmpxchg64 macro from uisqueue.h and uisqueue.c.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/include/uisqueue.h
drivers/staging/unisys/uislib/uisqueue.c

index a2abfa8c82fdcc1ad56be92d4239dec014cdae3a..8983407592a94db905df2085fb33243230120541 100644 (file)
@@ -423,19 +423,4 @@ struct guest_msgs {
 
 };
 
-#ifndef __xg
-#define __xg(x) ((volatile long *)(x))
-#endif
-
-/*
-*  Below code is a copy of Linux kernel's cmpxchg function located at
-*  this place
-*  http://tcsxeon:8080/source/xref/00trunk-AppOS-linux/include/asm-x86/cmpxchg_64.h#84
-*  Reason for creating our own version of cmpxchg along with
-*  UISLIB_LOCK_PREFIX is to make the operation atomic even for non SMP
-*  guests.
-*/
-
-#define uislibcmpxchg64(p, o, n, s) cmpxchg(p, o, n)
-
 #endif                         /* __UISQUEUE_H__ */
index 84eafca5e45c7623b1ac70e4b8a4112d0315076d..f52bca1d95b19c8760c53cd342855ceb7d444922 100644 (file)
@@ -43,8 +43,7 @@ uisqueue_InterlockedOr(unsigned long long __iomem *Target,
        j = readq(Target);
        do {
                i = j;
-               j = uislibcmpxchg64((__force unsigned long long *)Target,
-                                   i, i | Set, sizeof(*(Target)));
+               j = cmpxchg((__force unsigned long long *)Target, i, i | Set);
 
        } while (i != j);
 
@@ -62,8 +61,7 @@ uisqueue_InterlockedAnd(unsigned long long __iomem *Target,
        j = readq(Target);
        do {
                i = j;
-               j = uislibcmpxchg64((__force unsigned long long *)Target,
-                                   i, i & Set, sizeof(*(Target)));
+               j = cmpxchg((__force unsigned long long *)Target, i, i & Set);
 
        } while (i != j);