Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1401832

[RFC][PATCH 6/7] locking,s390: Remove s390 rwsem add and rwsem update

From Jason Low <jason.low2@hpe.com>
Newsgroups linux.kernel
Subject [RFC][PATCH 6/7] locking,s390: Remove s390 rwsem add and rwsem update
Date 2016-05-17 02:50 +0200
Message-ID <rzBmV-5OI-9@gated-at.bofh.it> (permalink)
References <rzBmV-5OI-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The rwsem 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 s390 implementation of rwsem_atomic_add() and
rwsem_atomic_update().

Signed-off-by: Jason Low <jason.low2@hpe.com>
---
 arch/s390/include/asm/rwsem.h | 37 -------------------------------------
 1 file changed, 37 deletions(-)

diff --git a/arch/s390/include/asm/rwsem.h b/arch/s390/include/asm/rwsem.h
index c75e447..597e7e9 100644
--- a/arch/s390/include/asm/rwsem.h
+++ b/arch/s390/include/asm/rwsem.h
@@ -207,41 +207,4 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
 		rwsem_downgrade_wake(sem);
 }
 
-/*
- * implement atomic add functionality
- */
-static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem)
-{
-	signed long old, new;
-
-	asm volatile(
-		"	lg	%0,%2\n"
-		"0:	lgr	%1,%0\n"
-		"	agr	%1,%4\n"
-		"	csg	%0,%1,%2\n"
-		"	jl	0b"
-		: "=&d" (old), "=&d" (new), "=Q" (sem->count)
-		: "Q" (sem->count), "d" (delta)
-		: "cc", "memory");
-}
-
-/*
- * implement exchange and add functionality
- */
-static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
-{
-	signed long old, new;
-
-	asm volatile(
-		"	lg	%0,%2\n"
-		"0:	lgr	%1,%0\n"
-		"	agr	%1,%4\n"
-		"	csg	%0,%1,%2\n"
-		"	jl	0b"
-		: "=&d" (old), "=&d" (new), "=Q" (sem->count)
-		: "Q" (sem->count), "d" (delta)
-		: "cc", "memory");
-	return new;
-}
-
 #endif /* _S390_RWSEM_H */
-- 
2.1.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 0/7] locking/rwsem: Convert rwsem count to atomic_long_t Jason Low <jason.low2@hpe.com> - 2016-05-17 02:50 +0200
  [RFC][PATCH 6/7] locking,s390: Remove s390 rwsem add and rwsem update Jason Low <jason.low2@hpe.com> - 2016-05-17 02:50 +0200
  [RFC][PATCH 7/7] locking,asm-generic: Remove generic rwsem add and rwsem update definitions Jason Low <jason.low2@hpe.com> - 2016-05-17 02:50 +0200
  [RFC][PATCH 5/7] locking,ia64: Remove ia64 rwsem add and rwsem update Jason Low <jason.low2@hpe.com> - 2016-05-17 02:50 +0200
  [RFC][PATCH 1/7] locking/rwsem: Optimize write lock by reducing operations in slowpath Jason Low <jason.low2@hpe.com> - 2016-05-17 02:50 +0200
  [RFC][PATCH 3/7] locking,x86: Remove x86 rwsem add and rwsem update Jason Low <jason.low2@hpe.com> - 2016-05-17 02:50 +0200
  [RFC][PATCH 2/7] locking/rwsem: Convert sem->count to atomic_long_t Jason Low <jason.low2@hpe.com> - 2016-05-17 02:50 +0200
  Re: [RFC][PATCH 0/7] locking/rwsem: Convert rwsem count to atomic_long_t Linus Torvalds <torvalds@linux-foundation.org> - 2016-05-17 03:20 +0200
    Re: [RFC][PATCH 0/7] locking/rwsem: Convert rwsem count to  atomic_long_t Peter Zijlstra <peterz@infradead.org> - 2016-05-17 13:20 +0200
      Re: [RFC][PATCH 0/7] locking/rwsem: Convert rwsem count to  atomic_long_t Jason Low <jason.low2@hpe.com> - 2016-05-17 19:10 +0200
      Re: [RFC][PATCH 0/7] locking/rwsem: Convert rwsem count to  atomic_long_t Davidlohr Bueso <dave@stgolabs.net> - 2016-05-20 08:30 +0200

csiph-web