projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] zd1211rw: Added new USB id for Planex GW-US54ZGL
[powerpc.git]
/
include
/
asm-frv
/
atomic.h
diff --git
a/include/asm-frv/atomic.h
b/include/asm-frv/atomic.h
index
9c9e949
..
066386a
100644
(file)
--- a/
include/asm-frv/atomic.h
+++ b/
include/asm-frv/atomic.h
@@
-14,7
+14,6
@@
#ifndef _ASM_ATOMIC_H
#define _ASM_ATOMIC_H
#ifndef _ASM_ATOMIC_H
#define _ASM_ATOMIC_H
-#include <linux/config.h>
#include <linux/types.h>
#include <asm/spr-regs.h>
#include <linux/types.h>
#include <asm/spr-regs.h>
@@
-220,15
+219,15
@@
extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig
switch (sizeof(__xg_orig)) { \
case 4: \
asm volatile( \
switch (sizeof(__xg_orig)) { \
case 4: \
asm volatile( \
- "swap%I0 %
2,%M0
" \
- : "+m"(*__xg_ptr), "=
&r"(__xg_orig)
\
- : "
r
"(x) \
+ "swap%I0 %
M0,%1
" \
+ : "+m"(*__xg_ptr), "=
r"(__xg_orig)
\
+ : "
1
"(x) \
: "memory" \
); \
break; \
\
default: \
: "memory" \
); \
break; \
\
default: \
- __xg_orig =
0;
\
+ __xg_orig =
(__typeof__(__xg_orig))0;
\
asm volatile("break"); \
break; \
} \
asm volatile("break"); \
break; \
} \
@@
-248,7
+247,7
@@
extern uint32_t __xchg_32(uint32_t i, volatile void *v);
switch (sizeof(__xg_orig)) { \
case 4: __xg_orig = (__typeof__(*(ptr))) __xchg_32((uint32_t) x, __xg_ptr); break; \
default: \
switch (sizeof(__xg_orig)) { \
case 4: __xg_orig = (__typeof__(*(ptr))) __xchg_32((uint32_t) x, __xg_ptr); break; \
default: \
- __xg_orig =
0;
\
+ __xg_orig =
(__typeof__(__xg_orig))0;
\
asm volatile("break"); \
break; \
} \
asm volatile("break"); \
break; \
} \
@@
-328,6
+327,7
@@
extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new);
#endif
#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
#endif
#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
+#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
#define atomic_add_unless(v, a, u) \
({ \
#define atomic_add_unless(v, a, u) \
({ \