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/ipl.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/ipl.c')
-rw-r--r-- | arch/s390/kernel/ipl.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 6555cc48e28f..1f5e782b3d05 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -120,24 +120,15 @@ static enum shutdown_action on_panic_action = SHUTDOWN_STOP; | |||
120 | 120 | ||
121 | static int diag308(unsigned long subcode, void *addr) | 121 | static int diag308(unsigned long subcode, void *addr) |
122 | { | 122 | { |
123 | register unsigned long _addr asm("0") = (unsigned long)addr; | 123 | register unsigned long _addr asm("0") = (unsigned long) addr; |
124 | register unsigned long _rc asm("1") = 0; | 124 | register unsigned long _rc asm("1") = 0; |
125 | 125 | ||
126 | asm volatile ( | 126 | asm volatile( |
127 | " diag %0,%2,0x308\n" | 127 | " diag %0,%2,0x308\n" |
128 | "0: \n" | 128 | "0:\n" |
129 | ".section __ex_table,\"a\"\n" | 129 | EX_TABLE(0b,0b) |
130 | #ifdef CONFIG_64BIT | ||
131 | " .align 8\n" | ||
132 | " .quad 0b, 0b\n" | ||
133 | #else | ||
134 | " .align 4\n" | ||
135 | " .long 0b, 0b\n" | ||
136 | #endif | ||
137 | ".previous\n" | ||
138 | : "+d" (_addr), "+d" (_rc) | 130 | : "+d" (_addr), "+d" (_rc) |
139 | : "d" (subcode) : "cc", "memory" ); | 131 | : "d" (subcode) : "cc", "memory"); |
140 | |||
141 | return _rc; | 132 | return _rc; |
142 | } | 133 | } |
143 | 134 | ||