diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-09-28 10:56:43 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-09-28 10:56:43 -0400 |
commit | 94c12cc7d196bab34aaa98d38521549fa1e5ef76 (patch) | |
tree | 8e0cec0ed44445d74a2cb5160303d6b4dfb1bc31 /arch/s390/kernel/semaphore.c | |
parent | 25d83cbfaa44e1b9170c0941c3ef52ca39f54ccc (diff) |
[S390] Inline assembly cleanup.
Major cleanup of all s390 inline assemblies. They now have a common
coding style. Quite a few have been shortened, mainly by using register
asm variables. Use of the EX_TABLE macro helps as well. The atomic ops,
bit ops and locking inlines new use the Q-constraint if a newer gcc
is used. That results in slightly better code.
Thanks to Christian Borntraeger for proof reading the changes.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/semaphore.c')
-rw-r--r-- | arch/s390/kernel/semaphore.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/s390/kernel/semaphore.c b/arch/s390/kernel/semaphore.c index 8dfb690c159f..191303f6c1d8 100644 --- a/arch/s390/kernel/semaphore.c +++ b/arch/s390/kernel/semaphore.c | |||
@@ -26,17 +26,17 @@ static inline int __sem_update_count(struct semaphore *sem, int incr) | |||
26 | { | 26 | { |
27 | int old_val, new_val; | 27 | int old_val, new_val; |
28 | 28 | ||
29 | __asm__ __volatile__(" l %0,0(%3)\n" | 29 | asm volatile( |
30 | "0: ltr %1,%0\n" | 30 | " l %0,0(%3)\n" |
31 | " jhe 1f\n" | 31 | "0: ltr %1,%0\n" |
32 | " lhi %1,0\n" | 32 | " jhe 1f\n" |
33 | "1: ar %1,%4\n" | 33 | " lhi %1,0\n" |
34 | " cs %0,%1,0(%3)\n" | 34 | "1: ar %1,%4\n" |
35 | " jl 0b\n" | 35 | " cs %0,%1,0(%3)\n" |
36 | : "=&d" (old_val), "=&d" (new_val), | 36 | " jl 0b\n" |
37 | "=m" (sem->count) | 37 | : "=&d" (old_val), "=&d" (new_val), "=m" (sem->count) |
38 | : "a" (&sem->count), "d" (incr), "m" (sem->count) | 38 | : "a" (&sem->count), "d" (incr), "m" (sem->count) |
39 | : "cc" ); | 39 | : "cc"); |
40 | return old_val; | 40 | return old_val; |
41 | } | 41 | } |
42 | 42 | ||