aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/early.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-09-06 08:42:13 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-26 09:45:12 -0400
commitcaf757c609445b01ad845df160369d8ccfd97d5b (patch)
treeea281a82383c15ed92ec64e88c4b1b55462d9c6e /arch/s390/kernel/early.c
parent94f2b9e25dc4d71b12cd16b6786cdef52b34a931 (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/kernel/early.c')
-rw-r--r--arch/s390/kernel/early.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index e8000d5ff533..7f4717675c19 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -222,12 +222,12 @@ static noinline __init void detect_machine_type(void)
222 struct sysinfo_3_2_2 *vmms = (struct sysinfo_3_2_2 *)&sysinfo_page; 222 struct sysinfo_3_2_2 *vmms = (struct sysinfo_3_2_2 *)&sysinfo_page;
223 223
224 /* Check current-configuration-level */ 224 /* Check current-configuration-level */
225 if ((stsi(NULL, 0, 0, 0) >> 28) <= 2) { 225 if (stsi(NULL, 0, 0, 0) <= 2) {
226 S390_lowcore.machine_flags |= MACHINE_FLAG_LPAR; 226 S390_lowcore.machine_flags |= MACHINE_FLAG_LPAR;
227 return; 227 return;
228 } 228 }
229 /* Get virtual-machine cpu information. */ 229 /* Get virtual-machine cpu information. */
230 if (stsi(vmms, 3, 2, 2) == -ENOSYS || !vmms->count) 230 if (stsi(vmms, 3, 2, 2) || !vmms->count)
231 return; 231 return;
232 232
233 /* Running under KVM? If not we assume z/VM */ 233 /* Running under KVM? If not we assume z/VM */
@@ -246,7 +246,7 @@ static __init void setup_topology(void)
246 return; 246 return;
247 S390_lowcore.machine_flags |= MACHINE_FLAG_TOPOLOGY; 247 S390_lowcore.machine_flags |= MACHINE_FLAG_TOPOLOGY;
248 for (max_mnest = 6; max_mnest > 1; max_mnest--) { 248 for (max_mnest = 6; max_mnest > 1; max_mnest--) {
249 if (stsi(&sysinfo_page, 15, 1, max_mnest) != -ENOSYS) 249 if (stsi(&sysinfo_page, 15, 1, max_mnest) == 0)
250 break; 250 break;
251 } 251 }
252 topology_max_mnest = max_mnest; 252 topology_max_mnest = max_mnest;