aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm
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/kvm
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/kvm')
-rw-r--r--arch/s390/kvm/priv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
index 60da903d6f3e..310be61bead7 100644
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
@@ -211,7 +211,7 @@ static void handle_stsi_3_2_2(struct kvm_vcpu *vcpu, struct sysinfo_3_2_2 *mem)
211 spin_unlock(&fi->lock); 211 spin_unlock(&fi->lock);
212 212
213 /* deal with other level 3 hypervisors */ 213 /* deal with other level 3 hypervisors */
214 if (stsi(mem, 3, 2, 2) == -ENOSYS) 214 if (stsi(mem, 3, 2, 2))
215 mem->count = 0; 215 mem->count = 0;
216 if (mem->count < 8) 216 if (mem->count < 8)
217 mem->count++; 217 mem->count++;
@@ -259,7 +259,7 @@ static int handle_stsi(struct kvm_vcpu *vcpu)
259 mem = get_zeroed_page(GFP_KERNEL); 259 mem = get_zeroed_page(GFP_KERNEL);
260 if (!mem) 260 if (!mem)
261 goto out_fail; 261 goto out_fail;
262 if (stsi((void *) mem, fc, sel1, sel2) == -ENOSYS) 262 if (stsi((void *) mem, fc, sel1, sel2))
263 goto out_mem; 263 goto out_mem;
264 break; 264 break;
265 case 3: 265 case 3: