aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorJason Low <jason.low2@hpe.com>2016-05-16 20:38:02 -0400
committerIngo Molnar <mingo@kernel.org>2016-06-08 09:16:59 -0400
commitd157bd860f1c828593730dca594d0ce51956833b (patch)
treee0d9bc3d73909ee33912016094b76118869b7b60 /include/asm-generic
parent8ee62b1870be8e630158701632a533d0378e15b8 (diff)
locking/rwsem: Remove rwsem_atomic_add() and rwsem_atomic_update()
The rwsem-xadd count has been converted to an atomic variable and the rwsem code now directly uses atomic_long_add() and atomic_long_add_return(), so we can remove the arch implementations of rwsem_atomic_add() and rwsem_atomic_update(). Signed-off-by: Jason Low <jason.low2@hpe.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christoph Lameter <cl@linux.com> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Jason Low <jason.low2@hp.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Terry Rudd <terry.rudd@hpe.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Waiman Long <Waiman.Long@hpe.com> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/rwsem.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/include/asm-generic/rwsem.h b/include/asm-generic/rwsem.h
index a3a93eca766c..5be122e3d326 100644
--- a/include/asm-generic/rwsem.h
+++ b/include/asm-generic/rwsem.h
@@ -107,14 +107,6 @@ static inline void __up_write(struct rw_semaphore *sem)
107} 107}
108 108
109/* 109/*
110 * implement atomic add functionality
111 */
112static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem)
113{
114 atomic_long_add(delta, (atomic_long_t *)&sem->count);
115}
116
117/*
118 * downgrade write lock to read lock 110 * downgrade write lock to read lock
119 */ 111 */
120static inline void __downgrade_write(struct rw_semaphore *sem) 112static inline void __downgrade_write(struct rw_semaphore *sem)
@@ -134,13 +126,5 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
134 rwsem_downgrade_wake(sem); 126 rwsem_downgrade_wake(sem);
135} 127}
136 128
137/*
138 * implement exchange and add functionality
139 */
140static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
141{
142 return atomic_long_add_return(delta, (atomic_long_t *)&sem->count);
143}
144
145#endif /* __KERNEL__ */ 129#endif /* __KERNEL__ */
146#endif /* _ASM_GENERIC_RWSEM_H */ 130#endif /* _ASM_GENERIC_RWSEM_H */