Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

locking/atomic: Remove linux/atomic.h:atomic_fetch_or()

Since all architectures have this implemented now natively, remove this
dead code.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Peter Zijlstra and committed by
Ingo Molnar
b53d6bed 28aa2bda

-64
-2
arch/alpha/include/asm/atomic.h
··· 153 153 #define atomic_andnot atomic_andnot 154 154 #define atomic64_andnot atomic64_andnot 155 155 156 - #define atomic_fetch_or atomic_fetch_or 157 - 158 156 #undef ATOMIC_OPS 159 157 #define ATOMIC_OPS(op, asm) \ 160 158 ATOMIC_OP(op, asm) \
-2
arch/arc/include/asm/atomic.h
··· 189 189 190 190 #define atomic_andnot atomic_andnot 191 191 192 - #define atomic_fetch_or atomic_fetch_or 193 - 194 192 #undef ATOMIC_OPS 195 193 #define ATOMIC_OPS(op, c_op, asm_op) \ 196 194 ATOMIC_OP(op, c_op, asm_op) \
-2
arch/arm/include/asm/atomic.h
··· 201 201 return val; \ 202 202 } 203 203 204 - #define atomic_fetch_or atomic_fetch_or 205 - 206 204 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) 207 205 { 208 206 int ret;
-2
arch/arm64/include/asm/atomic.h
··· 128 128 #define __atomic_add_unless(v, a, u) ___atomic_add_unless(v, a, u,) 129 129 #define atomic_andnot atomic_andnot 130 130 131 - #define atomic_fetch_or atomic_fetch_or 132 - 133 131 /* 134 132 * 64-bit atomic operations. 135 133 */
-2
arch/avr32/include/asm/atomic.h
··· 66 66 ATOMIC_FETCH_OP (sub, sub, rKs21) 67 67 ATOMIC_FETCH_OP (add, add, r) 68 68 69 - #define atomic_fetch_or atomic_fetch_or 70 - 71 69 #define ATOMIC_OPS(op, asm_op) \ 72 70 ATOMIC_OP_RETURN(op, asm_op, r) \ 73 71 static inline void atomic_##op(int i, atomic_t *v) \
-2
arch/frv/include/asm/atomic.h
··· 74 74 #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) 75 75 #define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) 76 76 77 - #define atomic_fetch_or atomic_fetch_or 78 - 79 77 /* 80 78 * 64-bit atomic ops 81 79 */
-2
arch/h8300/include/asm/atomic.h
··· 54 54 ATOMIC_OP_RETURN(add, +=) 55 55 ATOMIC_OP_RETURN(sub, -=) 56 56 57 - #define atomic_fetch_or atomic_fetch_or 58 - 59 57 #define ATOMIC_OPS(op, c_op) \ 60 58 ATOMIC_OP(op, c_op) \ 61 59 ATOMIC_FETCH_OP(op, c_op)
-2
arch/hexagon/include/asm/atomic.h
··· 152 152 #undef ATOMIC_OPS 153 153 #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op) 154 154 155 - #define atomic_fetch_or atomic_fetch_or 156 - 157 155 ATOMIC_OPS(and) 158 156 ATOMIC_OPS(or) 159 157 ATOMIC_OPS(xor)
-2
arch/m32r/include/asm/atomic.h
··· 121 121 #undef ATOMIC_OPS 122 122 #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op) 123 123 124 - #define atomic_fetch_or atomic_fetch_or 125 - 126 124 ATOMIC_OPS(and) 127 125 ATOMIC_OPS(or) 128 126 ATOMIC_OPS(xor)
-2
arch/m68k/include/asm/atomic.h
··· 119 119 ATOMIC_OP(op, c_op, asm_op) \ 120 120 ATOMIC_FETCH_OP(op, c_op, asm_op) 121 121 122 - #define atomic_fetch_or atomic_fetch_or 123 - 124 122 ATOMIC_OPS(and, &=, and) 125 123 ATOMIC_OPS(or, |=, or) 126 124 ATOMIC_OPS(xor, ^=, eor)
-2
arch/metag/include/asm/atomic.h
··· 17 17 #include <asm/atomic_lnkget.h> 18 18 #endif 19 19 20 - #define atomic_fetch_or atomic_fetch_or 21 - 22 20 #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) 23 21 24 22 #define atomic_dec_return(v) atomic_sub_return(1, (v))
-2
arch/mips/include/asm/atomic.h
··· 194 194 ATOMIC_OP(op, c_op, asm_op) \ 195 195 ATOMIC_FETCH_OP(op, c_op, asm_op) 196 196 197 - #define atomic_fetch_or atomic_fetch_or 198 - 199 197 ATOMIC_OPS(and, &=, and) 200 198 ATOMIC_OPS(or, |=, or) 201 199 ATOMIC_OPS(xor, ^=, xor)
-2
arch/mn10300/include/asm/atomic.h
··· 113 113 #undef ATOMIC_OPS 114 114 #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op) 115 115 116 - #define atomic_fetch_or atomic_fetch_or 117 - 118 116 ATOMIC_OPS(and) 119 117 ATOMIC_OPS(or) 120 118 ATOMIC_OPS(xor)
-2
arch/parisc/include/asm/atomic.h
··· 148 148 ATOMIC_OP(op, c_op) \ 149 149 ATOMIC_FETCH_OP(op, c_op) 150 150 151 - #define atomic_fetch_or atomic_fetch_or 152 - 153 151 ATOMIC_OPS(and, &=) 154 152 ATOMIC_OPS(or, |=) 155 153 ATOMIC_OPS(xor, ^=)
-2
arch/s390/include/asm/atomic.h
··· 135 135 return __ATOMIC_LOOP(v, i, __ATOMIC_##OP, __ATOMIC_BARRIER); \ 136 136 } 137 137 138 - #define atomic_fetch_or atomic_fetch_or 139 - 140 138 ATOMIC_OPS(and, AND) 141 139 ATOMIC_OPS(or, OR) 142 140 ATOMIC_OPS(xor, XOR)
-2
arch/sh/include/asm/atomic.h
··· 25 25 #include <asm/atomic-irq.h> 26 26 #endif 27 27 28 - #define atomic_fetch_or atomic_fetch_or 29 - 30 28 #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) 31 29 #define atomic_dec_return(v) atomic_sub_return(1, (v)) 32 30 #define atomic_inc_return(v) atomic_add_return(1, (v))
-1
arch/sparc/include/asm/atomic.h
··· 5 5 #else 6 6 #include <asm/atomic_32.h> 7 7 #endif 8 - #define atomic_fetch_or atomic_fetch_or 9 8 #endif
-2
arch/sparc/include/asm/atomic_32.h
··· 36 36 #define atomic_inc(v) ((void)atomic_add_return( 1, (v))) 37 37 #define atomic_dec(v) ((void)atomic_add_return( -1, (v))) 38 38 39 - #define atomic_fetch_or atomic_fetch_or 40 - 41 39 #define atomic_and(i, v) ((void)atomic_fetch_and((i), (v))) 42 40 #define atomic_or(i, v) ((void)atomic_fetch_or((i), (v))) 43 41 #define atomic_xor(i, v) ((void)atomic_fetch_xor((i), (v)))
-2
arch/tile/include/asm/atomic.h
··· 48 48 49 49 #define atomic_fetch_sub(i, v) atomic_fetch_add(-(int)(i), (v)) 50 50 51 - #define atomic_fetch_or atomic_fetch_or 52 - 53 51 /** 54 52 * atomic_sub - subtract integer from atomic variable 55 53 * @i: integer value to subtract
-2
arch/x86/include/asm/atomic.h
··· 217 217 ATOMIC_OP(op) \ 218 218 ATOMIC_FETCH_OP(op, c_op) 219 219 220 - #define atomic_fetch_or atomic_fetch_or 221 - 222 220 ATOMIC_OPS(and, &) 223 221 ATOMIC_OPS(or , |) 224 222 ATOMIC_OPS(xor, ^)
-2
arch/xtensa/include/asm/atomic.h
··· 188 188 #undef ATOMIC_OPS 189 189 #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op) 190 190 191 - #define atomic_fetch_or atomic_fetch_or 192 - 193 191 ATOMIC_OPS(and) 194 192 ATOMIC_OPS(or) 195 193 ATOMIC_OPS(xor)
-2
include/asm-generic/atomic.h
··· 137 137 #endif 138 138 139 139 #ifndef atomic_fetch_or 140 - #define atomic_fetch_or atomic_fetch_or 141 - 142 140 ATOMIC_FETCH_OP(or, |) 143 141 #endif 144 142
-21
include/linux/atomic.h
··· 573 573 } 574 574 #endif 575 575 576 - /** 577 - * atomic_fetch_or - perform *p |= mask and return old value of *p 578 - * @mask: mask to OR on the atomic_t 579 - * @p: pointer to atomic_t 580 - */ 581 - #ifndef atomic_fetch_or 582 - static inline int atomic_fetch_or(int mask, atomic_t *p) 583 - { 584 - int old, val = atomic_read(p); 585 - 586 - for (;;) { 587 - old = atomic_cmpxchg(p, val, val | mask); 588 - if (old == val) 589 - break; 590 - val = old; 591 - } 592 - 593 - return old; 594 - } 595 - #endif 596 - 597 576 #ifdef CONFIG_GENERIC_ATOMIC64 598 577 #include <asm-generic/atomic64.h> 599 578 #endif