]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Manual merge after sync with mainline
authorTony Lindgren <tony@atomide.com>
Fri, 18 Nov 2005 01:05:25 +0000 (17:05 -0800)
committerTony Lindgren <tony@atomide.com>
Fri, 18 Nov 2005 01:05:25 +0000 (17:05 -0800)
Manual merge after sync with mainline

include/asm-arm/atomic.h

index 5ef3eb44ef398dd1e49d509795af0018fb4f5554..d586f65c8228ee8bad32aaf945edc47ee727e731 100644 (file)
@@ -12,7 +12,7 @@
 #define __ASM_ARM_ATOMIC_H
 
 #include <linux/config.h>
-#include <linux/types.h>
+#include <linux/compiler.h>
 
 typedef struct { volatile int counter; } atomic_t;
 
@@ -83,11 +83,12 @@ static inline int atomic_sub_return(int i, atomic_t *v)
 
 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 {
-       u32 oldval, res;
+       unsigned long oldval, res;
 
        do {
                __asm__ __volatile__("@ atomic_cmpxchg\n"
                "ldrex  %1, [%2]\n"
+               "mov    %0, #0\n"
                "teq    %1, %3\n"
                "strexeq %0, %4, [%2]\n"
                    : "=&r" (res), "=&r" (oldval)