[RFC][PATCH 28/31] locking: Remove the deprecated atomic_{set,clear}_mask() functions
From: Peter Zijlstra
Date: Fri Apr 22 2016 - 05:58:29 EST
- Next message: Peter Zijlstra: "[RFC][PATCH 26/31] locking: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()"
- Previous message: Marc Zyngier: "Re: [PATCH V2 14/14] irqchip/gic: Add support for tegra AGIC interrupt controller"
- In reply to: Peter Zijlstra: "Re: [RFC][PATCH 01/31] locking: Flip arguments to atomic_fetch_or"
- Next in thread: Peter Zijlstra: "[RFC][PATCH 26/31] locking: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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@xxxxxxxxxxxxx>
---
include/linux/atomic.h | 10 ----------
kernel/locking/qspinlock_paravirt.h | 4 ++--
2 files changed, 2 insertions(+), 12 deletions(-)
--- a/include/linux/atomic.h
+++ b/include/linux/atomic.h
@@ -480,16 +480,6 @@ static inline int atomic_fetch_andnot_re
}
#endif
-static inline __deprecated void atomic_clear_mask(unsigned int mask, atomic_t *v)
-{
- atomic_andnot(mask, v);
-}
-
-static inline __deprecated void atomic_set_mask(unsigned int mask, atomic_t *v)
-{
- atomic_or(mask, v);
-}
-
/**
* atomic_inc_not_zero_hint - increment if not null
* @v: pointer of type atomic_t
--- a/kernel/locking/qspinlock_paravirt.h
+++ b/kernel/locking/qspinlock_paravirt.h
@@ -112,12 +112,12 @@ static __always_inline int trylock_clear
#else /* _Q_PENDING_BITS == 8 */
static __always_inline void set_pending(struct qspinlock *lock)
{
- atomic_set_mask(_Q_PENDING_VAL, &lock->val);
+ atomic_or(_Q_PENDING_VAL, &lock->val);
}
static __always_inline void clear_pending(struct qspinlock *lock)
{
- atomic_clear_mask(_Q_PENDING_VAL, &lock->val);
+ atomic_andnot(_Q_PENDING_VAL, &lock->val);
}
static __always_inline int trylock_clear_pending(struct qspinlock *lock)
- Next message: Peter Zijlstra: "[RFC][PATCH 26/31] locking: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()"
- Previous message: Marc Zyngier: "Re: [PATCH V2 14/14] irqchip/gic: Add support for tegra AGIC interrupt controller"
- In reply to: Peter Zijlstra: "Re: [RFC][PATCH 01/31] locking: Flip arguments to atomic_fetch_or"
- Next in thread: Peter Zijlstra: "[RFC][PATCH 26/31] locking: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]