diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-04-23 13:32:50 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-07-27 08:06:24 -0400 |
commit | e6942b7de2dfe44ebde9bae57dadece5abca9de8 (patch) | |
tree | b235317c5f6d200bcc25b43a406237a0d15319cf /arch/tile/include | |
parent | 2957c035395e492463d7f589af9dd32388967bbb (diff) |
atomic: Provide atomic_{or,xor,and}
Implement atomic logic ops -- atomic_{or,xor,and}.
These will replace the atomic_{set,clear}_mask functions that are
available on some archs.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/tile/include')
-rw-r--r-- | arch/tile/include/asm/atomic_32.h | 2 | ||||
-rw-r--r-- | arch/tile/include/asm/atomic_64.h | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/arch/tile/include/asm/atomic_32.h b/arch/tile/include/asm/atomic_32.h index 94237922f0dd..d320ce253d86 100644 --- a/arch/tile/include/asm/atomic_32.h +++ b/arch/tile/include/asm/atomic_32.h | |||
@@ -41,8 +41,6 @@ static inline void atomic_##op(int i, atomic_t *v) \ | |||
41 | _atomic_##op((unsigned long *)&v->counter, i); \ | 41 | _atomic_##op((unsigned long *)&v->counter, i); \ |
42 | } | 42 | } |
43 | 43 | ||
44 | #define CONFIG_ARCH_HAS_ATOMIC_OR | ||
45 | |||
46 | ATOMIC_OP(and) | 44 | ATOMIC_OP(and) |
47 | ATOMIC_OP(or) | 45 | ATOMIC_OP(or) |
48 | ATOMIC_OP(xor) | 46 | ATOMIC_OP(xor) |
diff --git a/arch/tile/include/asm/atomic_64.h b/arch/tile/include/asm/atomic_64.h index d07d9fc6e2a1..096a56d6ead4 100644 --- a/arch/tile/include/asm/atomic_64.h +++ b/arch/tile/include/asm/atomic_64.h | |||
@@ -58,8 +58,6 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) | |||
58 | return oldval; | 58 | return oldval; |
59 | } | 59 | } |
60 | 60 | ||
61 | #define CONFIG_ARCH_HAS_ATOMIC_OR | ||
62 | |||
63 | static inline void atomic_and(int i, atomic_t *v) | 61 | static inline void atomic_and(int i, atomic_t *v) |
64 | { | 62 | { |
65 | __insn_fetchand4((void *)&v->counter, i); | 63 | __insn_fetchand4((void *)&v->counter, i); |