diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-09-06 08:42:13 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-09-26 09:45:12 -0400 |
commit | caf757c609445b01ad845df160369d8ccfd97d5b (patch) | |
tree | ea281a82383c15ed92ec64e88c4b1b55462d9c6e /arch/s390/include | |
parent | 94f2b9e25dc4d71b12cd16b6786cdef52b34a931 (diff) |
s390/sysinfo,stsi: change return code handling
Change return code handling of the stsi() function:
In case function code 0 was specified the return value is the
current configuration level (already shifted). That way all
the code that actually copied the stsi_0() function can go
away.
Otherwise the return value is 0 (success) or negative to
indicate an error (currently only -EOPNOTSUPP).
Also stsi() is no longer an inline function. The function is
not performance critical, but every caller would generate an
exception table entry for this function.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/sysinfo.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/arch/s390/include/asm/sysinfo.h b/arch/s390/include/asm/sysinfo.h index 04e6e9774708..f92428e459f8 100644 --- a/arch/s390/include/asm/sysinfo.h +++ b/arch/s390/include/asm/sysinfo.h | |||
@@ -153,21 +153,7 @@ struct sysinfo_15_1_x { | |||
153 | union topology_entry tle[0]; | 153 | union topology_entry tle[0]; |
154 | }; | 154 | }; |
155 | 155 | ||
156 | static inline int stsi(void *sysinfo, int fc, int sel1, int sel2) | 156 | int stsi(void *sysinfo, int fc, int sel1, int sel2); |
157 | { | ||
158 | register int r0 asm("0") = (fc << 28) | sel1; | ||
159 | register int r1 asm("1") = sel2; | ||
160 | |||
161 | asm volatile( | ||
162 | " stsi 0(%2)\n" | ||
163 | "0: jz 2f\n" | ||
164 | "1: lhi %0,%3\n" | ||
165 | "2:\n" | ||
166 | EX_TABLE(0b, 1b) | ||
167 | : "+d" (r0) : "d" (r1), "a" (sysinfo), "K" (-ENOSYS) | ||
168 | : "cc", "memory"); | ||
169 | return r0; | ||
170 | } | ||
171 | 157 | ||
172 | /* | 158 | /* |
173 | * Service level reporting interface. | 159 | * Service level reporting interface. |