Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1401830
| From | Jason Low <jason.low2@hpe.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC][PATCH 4/7] locking,alpha: Remove Alpha rwsem add and rwsem update |
| Date | 2016-05-17 02:50 +0200 |
| Message-ID | <rzBmV-5OI-1@gated-at.bofh.it> (permalink) |
| References | <rzBmV-5OI-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 alpha implementation of rwsem_atomic_add() and
rwsem_atomic_update().
Signed-off-by: Jason Low <jason.low2@hpe.com>
---
arch/alpha/include/asm/rwsem.h | 42 ------------------------------------------
1 file changed, 42 deletions(-)
diff --git a/arch/alpha/include/asm/rwsem.h b/arch/alpha/include/asm/rwsem.h
index 0131a70..a217bf8 100644
--- a/arch/alpha/include/asm/rwsem.h
+++ b/arch/alpha/include/asm/rwsem.h
@@ -191,47 +191,5 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
rwsem_downgrade_wake(sem);
}
-static inline void rwsem_atomic_add(long val, struct rw_semaphore *sem)
-{
-#ifndef CONFIG_SMP
- sem->count += val;
-#else
- long temp;
- __asm__ __volatile__(
- "1: ldq_l %0,%1\n"
- " addq %0,%2,%0\n"
- " stq_c %0,%1\n"
- " beq %0,2f\n"
- ".subsection 2\n"
- "2: br 1b\n"
- ".previous"
- :"=&r" (temp), "=m" (sem->count)
- :"Ir" (val), "m" (sem->count));
-#endif
-}
-
-static inline long rwsem_atomic_update(long val, struct rw_semaphore *sem)
-{
-#ifndef CONFIG_SMP
- sem->count += val;
- return sem->count;
-#else
- long ret, temp;
- __asm__ __volatile__(
- "1: ldq_l %0,%1\n"
- " addq %0,%3,%2\n"
- " addq %0,%3,%0\n"
- " stq_c %2,%1\n"
- " beq %2,2f\n"
- ".subsection 2\n"
- "2: br 1b\n"
- ".previous"
- :"=&r" (ret), "=m" (sem->count), "=&r" (temp)
- :"Ir" (val), "m" (sem->count));
-
- return ret;
-#endif
-}
-
#endif /* __KERNEL__ */
#endif /* _ALPHA_RWSEM_H */
--
2.1.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[RFC][PATCH 4/7] locking,alpha: Remove Alpha rwsem add and rwsem update Jason Low <jason.low2@hpe.com> - 2016-05-17 02:50 +0200
csiph-web