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

locking/atomic: Remove the deprecated atomic_{set,clear}_mask() functions

These functions have been deprecated for a while and there is only the
one user left, convert and kill.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
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: Will Deacon <will.deacon@arm.com>
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
e37837fb b53d6bed

+2 -12
-10
include/linux/atomic.h
··· 480 480 } 481 481 #endif 482 482 483 - static inline __deprecated void atomic_clear_mask(unsigned int mask, atomic_t *v) 484 - { 485 - atomic_andnot(mask, v); 486 - } 487 - 488 - static inline __deprecated void atomic_set_mask(unsigned int mask, atomic_t *v) 489 - { 490 - atomic_or(mask, v); 491 - } 492 - 493 483 /** 494 484 * atomic_inc_not_zero_hint - increment if not null 495 485 * @v: pointer of type atomic_t
+2 -2
kernel/locking/qspinlock_paravirt.h
··· 112 112 #else /* _Q_PENDING_BITS == 8 */ 113 113 static __always_inline void set_pending(struct qspinlock *lock) 114 114 { 115 - atomic_set_mask(_Q_PENDING_VAL, &lock->val); 115 + atomic_or(_Q_PENDING_VAL, &lock->val); 116 116 } 117 117 118 118 static __always_inline void clear_pending(struct qspinlock *lock) 119 119 { 120 - atomic_clear_mask(_Q_PENDING_VAL, &lock->val); 120 + atomic_andnot(_Q_PENDING_VAL, &lock->val); 121 121 } 122 122 123 123 static __always_inline int trylock_clear_pending(struct qspinlock *lock)