diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2010-02-26 16:37:41 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-02-26 16:37:31 -0500 |
commit | b8e660b83d505148c83ddc6d5ba69c29d0eab1e3 (patch) | |
tree | cd4a679a8bf867bd7b0644292524c5fed64c6d0b | |
parent | 59b697874529f5c3cbcaf5816b3d6c584af521e8 (diff) |
[S390] Replace ENOTSUPP usage with EOPNOTSUPP
ENOTSUPP is not supposed to leak to userspace so lets just use
EOPNOTSUPP everywhere.
Doesn't fix a bug, but makes future reviews easier.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/hypfs/hypfs_diag.c | 4 | ||||
-rw-r--r-- | arch/s390/kernel/ipl.c | 2 | ||||
-rw-r--r-- | arch/s390/kvm/diag.c | 4 | ||||
-rw-r--r-- | arch/s390/kvm/intercept.c | 18 | ||||
-rw-r--r-- | arch/s390/kvm/interrupt.c | 2 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 2 | ||||
-rw-r--r-- | arch/s390/kvm/priv.c | 2 | ||||
-rw-r--r-- | arch/s390/kvm/sigp.c | 4 | ||||
-rw-r--r-- | arch/s390/mm/extmem.c | 12 |
9 files changed, 25 insertions, 25 deletions
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c index 2b92d501425f..87cf523192e9 100644 --- a/arch/s390/hypfs/hypfs_diag.c +++ b/arch/s390/hypfs/hypfs_diag.c | |||
@@ -488,7 +488,7 @@ out: | |||
488 | 488 | ||
489 | static int diag224(void *ptr) | 489 | static int diag224(void *ptr) |
490 | { | 490 | { |
491 | int rc = -ENOTSUPP; | 491 | int rc = -EOPNOTSUPP; |
492 | 492 | ||
493 | asm volatile( | 493 | asm volatile( |
494 | " diag %1,%2,0x224\n" | 494 | " diag %1,%2,0x224\n" |
@@ -507,7 +507,7 @@ static int diag224_get_name_table(void) | |||
507 | return -ENOMEM; | 507 | return -ENOMEM; |
508 | if (diag224(diag224_cpu_names)) { | 508 | if (diag224(diag224_cpu_names)) { |
509 | kfree(diag224_cpu_names); | 509 | kfree(diag224_cpu_names); |
510 | return -ENOTSUPP; | 510 | return -EOPNOTSUPP; |
511 | } | 511 | } |
512 | EBCASC(diag224_cpu_names + 16, (*diag224_cpu_names + 1) * 16); | 512 | EBCASC(diag224_cpu_names + 16, (*diag224_cpu_names + 1) * 16); |
513 | return 0; | 513 | return 0; |
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index ae9c564e375d..998bde3ec5ea 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -1592,7 +1592,7 @@ static void vmcmd_run(struct shutdown_trigger *trigger) | |||
1592 | static int vmcmd_init(void) | 1592 | static int vmcmd_init(void) |
1593 | { | 1593 | { |
1594 | if (!MACHINE_IS_VM) | 1594 | if (!MACHINE_IS_VM) |
1595 | return -ENOTSUPP; | 1595 | return -EOPNOTSUPP; |
1596 | vmcmd_kset = kset_create_and_add("vmcmd", NULL, firmware_kobj); | 1596 | vmcmd_kset = kset_create_and_add("vmcmd", NULL, firmware_kobj); |
1597 | if (!vmcmd_kset) | 1597 | if (!vmcmd_kset) |
1598 | return -ENOMEM; | 1598 | return -ENOMEM; |
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c index 8300309698fa..9e4c84187cf5 100644 --- a/arch/s390/kvm/diag.c +++ b/arch/s390/kvm/diag.c | |||
@@ -39,7 +39,7 @@ static int __diag_ipl_functions(struct kvm_vcpu *vcpu) | |||
39 | vcpu->run->s390_reset_flags = 0; | 39 | vcpu->run->s390_reset_flags = 0; |
40 | break; | 40 | break; |
41 | default: | 41 | default: |
42 | return -ENOTSUPP; | 42 | return -EOPNOTSUPP; |
43 | } | 43 | } |
44 | 44 | ||
45 | atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); | 45 | atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); |
@@ -62,6 +62,6 @@ int kvm_s390_handle_diag(struct kvm_vcpu *vcpu) | |||
62 | case 0x308: | 62 | case 0x308: |
63 | return __diag_ipl_functions(vcpu); | 63 | return __diag_ipl_functions(vcpu); |
64 | default: | 64 | default: |
65 | return -ENOTSUPP; | 65 | return -EOPNOTSUPP; |
66 | } | 66 | } |
67 | } | 67 | } |
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index b40096494e46..3ddc30895e31 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c | |||
@@ -32,7 +32,7 @@ static int handle_lctlg(struct kvm_vcpu *vcpu) | |||
32 | 32 | ||
33 | vcpu->stat.instruction_lctlg++; | 33 | vcpu->stat.instruction_lctlg++; |
34 | if ((vcpu->arch.sie_block->ipb & 0xff) != 0x2f) | 34 | if ((vcpu->arch.sie_block->ipb & 0xff) != 0x2f) |
35 | return -ENOTSUPP; | 35 | return -EOPNOTSUPP; |
36 | 36 | ||
37 | useraddr = disp2; | 37 | useraddr = disp2; |
38 | if (base2) | 38 | if (base2) |
@@ -138,7 +138,7 @@ static int handle_stop(struct kvm_vcpu *vcpu) | |||
138 | rc = __kvm_s390_vcpu_store_status(vcpu, | 138 | rc = __kvm_s390_vcpu_store_status(vcpu, |
139 | KVM_S390_STORE_STATUS_NOADDR); | 139 | KVM_S390_STORE_STATUS_NOADDR); |
140 | if (rc >= 0) | 140 | if (rc >= 0) |
141 | rc = -ENOTSUPP; | 141 | rc = -EOPNOTSUPP; |
142 | } | 142 | } |
143 | 143 | ||
144 | if (vcpu->arch.local_int.action_bits & ACTION_RELOADVCPU_ON_STOP) { | 144 | if (vcpu->arch.local_int.action_bits & ACTION_RELOADVCPU_ON_STOP) { |
@@ -150,7 +150,7 @@ static int handle_stop(struct kvm_vcpu *vcpu) | |||
150 | if (vcpu->arch.local_int.action_bits & ACTION_STOP_ON_STOP) { | 150 | if (vcpu->arch.local_int.action_bits & ACTION_STOP_ON_STOP) { |
151 | vcpu->arch.local_int.action_bits &= ~ACTION_STOP_ON_STOP; | 151 | vcpu->arch.local_int.action_bits &= ~ACTION_STOP_ON_STOP; |
152 | VCPU_EVENT(vcpu, 3, "%s", "cpu stopped"); | 152 | VCPU_EVENT(vcpu, 3, "%s", "cpu stopped"); |
153 | rc = -ENOTSUPP; | 153 | rc = -EOPNOTSUPP; |
154 | } | 154 | } |
155 | 155 | ||
156 | spin_unlock_bh(&vcpu->arch.local_int.lock); | 156 | spin_unlock_bh(&vcpu->arch.local_int.lock); |
@@ -171,9 +171,9 @@ static int handle_validity(struct kvm_vcpu *vcpu) | |||
171 | 2*PAGE_SIZE); | 171 | 2*PAGE_SIZE); |
172 | if (rc) | 172 | if (rc) |
173 | /* user will receive sigsegv, exit to user */ | 173 | /* user will receive sigsegv, exit to user */ |
174 | rc = -ENOTSUPP; | 174 | rc = -EOPNOTSUPP; |
175 | } else | 175 | } else |
176 | rc = -ENOTSUPP; | 176 | rc = -EOPNOTSUPP; |
177 | 177 | ||
178 | if (rc) | 178 | if (rc) |
179 | VCPU_EVENT(vcpu, 2, "unhandled validity intercept code %d", | 179 | VCPU_EVENT(vcpu, 2, "unhandled validity intercept code %d", |
@@ -189,7 +189,7 @@ static int handle_instruction(struct kvm_vcpu *vcpu) | |||
189 | handler = instruction_handlers[vcpu->arch.sie_block->ipa >> 8]; | 189 | handler = instruction_handlers[vcpu->arch.sie_block->ipa >> 8]; |
190 | if (handler) | 190 | if (handler) |
191 | return handler(vcpu); | 191 | return handler(vcpu); |
192 | return -ENOTSUPP; | 192 | return -EOPNOTSUPP; |
193 | } | 193 | } |
194 | 194 | ||
195 | static int handle_prog(struct kvm_vcpu *vcpu) | 195 | static int handle_prog(struct kvm_vcpu *vcpu) |
@@ -206,7 +206,7 @@ static int handle_instruction_and_prog(struct kvm_vcpu *vcpu) | |||
206 | rc = handle_instruction(vcpu); | 206 | rc = handle_instruction(vcpu); |
207 | rc2 = handle_prog(vcpu); | 207 | rc2 = handle_prog(vcpu); |
208 | 208 | ||
209 | if (rc == -ENOTSUPP) | 209 | if (rc == -EOPNOTSUPP) |
210 | vcpu->arch.sie_block->icptcode = 0x04; | 210 | vcpu->arch.sie_block->icptcode = 0x04; |
211 | if (rc) | 211 | if (rc) |
212 | return rc; | 212 | return rc; |
@@ -231,9 +231,9 @@ int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu) | |||
231 | u8 code = vcpu->arch.sie_block->icptcode; | 231 | u8 code = vcpu->arch.sie_block->icptcode; |
232 | 232 | ||
233 | if (code & 3 || (code >> 2) >= ARRAY_SIZE(intercept_funcs)) | 233 | if (code & 3 || (code >> 2) >= ARRAY_SIZE(intercept_funcs)) |
234 | return -ENOTSUPP; | 234 | return -EOPNOTSUPP; |
235 | func = intercept_funcs[code >> 2]; | 235 | func = intercept_funcs[code >> 2]; |
236 | if (func) | 236 | if (func) |
237 | return func(vcpu); | 237 | return func(vcpu); |
238 | return -ENOTSUPP; | 238 | return -EOPNOTSUPP; |
239 | } | 239 | } |
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 43486c2408e1..da20c3df3ec1 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -342,7 +342,7 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu) | |||
342 | if (psw_interrupts_disabled(vcpu)) { | 342 | if (psw_interrupts_disabled(vcpu)) { |
343 | VCPU_EVENT(vcpu, 3, "%s", "disabled wait"); | 343 | VCPU_EVENT(vcpu, 3, "%s", "disabled wait"); |
344 | __unset_cpu_idle(vcpu); | 344 | __unset_cpu_idle(vcpu); |
345 | return -ENOTSUPP; /* disabled wait */ | 345 | return -EOPNOTSUPP; /* disabled wait */ |
346 | } | 346 | } |
347 | 347 | ||
348 | if (psw_extint_disabled(vcpu) || | 348 | if (psw_extint_disabled(vcpu) || |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 70e799eefec9..7f19340481b7 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -543,7 +543,7 @@ rerun_vcpu: | |||
543 | rc = -EINTR; | 543 | rc = -EINTR; |
544 | } | 544 | } |
545 | 545 | ||
546 | if (rc == -ENOTSUPP) { | 546 | if (rc == -EOPNOTSUPP) { |
547 | /* intercept cannot be handled in-kernel, prepare kvm-run */ | 547 | /* intercept cannot be handled in-kernel, prepare kvm-run */ |
548 | kvm_run->exit_reason = KVM_EXIT_S390_SIEIC; | 548 | kvm_run->exit_reason = KVM_EXIT_S390_SIEIC; |
549 | kvm_run->s390_sieic.icptcode = vcpu->arch.sie_block->icptcode; | 549 | kvm_run->s390_sieic.icptcode = vcpu->arch.sie_block->icptcode; |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index d426aac8095d..28c55677eb39 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -323,5 +323,5 @@ int kvm_s390_handle_b2(struct kvm_vcpu *vcpu) | |||
323 | else | 323 | else |
324 | return handler(vcpu); | 324 | return handler(vcpu); |
325 | } | 325 | } |
326 | return -ENOTSUPP; | 326 | return -EOPNOTSUPP; |
327 | } | 327 | } |
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index 15ee1111de58..241a48459b66 100644 --- a/arch/s390/kvm/sigp.c +++ b/arch/s390/kvm/sigp.c | |||
@@ -172,7 +172,7 @@ static int __sigp_set_arch(struct kvm_vcpu *vcpu, u32 parameter) | |||
172 | rc = 0; /* order accepted */ | 172 | rc = 0; /* order accepted */ |
173 | break; | 173 | break; |
174 | default: | 174 | default: |
175 | rc = -ENOTSUPP; | 175 | rc = -EOPNOTSUPP; |
176 | } | 176 | } |
177 | return rc; | 177 | return rc; |
178 | } | 178 | } |
@@ -293,7 +293,7 @@ int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu) | |||
293 | vcpu->stat.instruction_sigp_restart++; | 293 | vcpu->stat.instruction_sigp_restart++; |
294 | /* user space must know about restart */ | 294 | /* user space must know about restart */ |
295 | default: | 295 | default: |
296 | return -ENOTSUPP; | 296 | return -EOPNOTSUPP; |
297 | } | 297 | } |
298 | 298 | ||
299 | if (rc < 0) | 299 | if (rc < 0) |
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c index 5c8457129603..6409fd57eb04 100644 --- a/arch/s390/mm/extmem.c +++ b/arch/s390/mm/extmem.c | |||
@@ -309,7 +309,7 @@ query_segment_type (struct dcss_segment *seg) | |||
309 | } | 309 | } |
310 | #endif | 310 | #endif |
311 | if (qout->segcnt > 6) { | 311 | if (qout->segcnt > 6) { |
312 | rc = -ENOTSUPP; | 312 | rc = -EOPNOTSUPP; |
313 | goto out_free; | 313 | goto out_free; |
314 | } | 314 | } |
315 | 315 | ||
@@ -324,11 +324,11 @@ query_segment_type (struct dcss_segment *seg) | |||
324 | for (i=0; i<qout->segcnt; i++) { | 324 | for (i=0; i<qout->segcnt; i++) { |
325 | if (((qout->range[i].start & 0xff) != SEG_TYPE_EW) && | 325 | if (((qout->range[i].start & 0xff) != SEG_TYPE_EW) && |
326 | ((qout->range[i].start & 0xff) != SEG_TYPE_EN)) { | 326 | ((qout->range[i].start & 0xff) != SEG_TYPE_EN)) { |
327 | rc = -ENOTSUPP; | 327 | rc = -EOPNOTSUPP; |
328 | goto out_free; | 328 | goto out_free; |
329 | } | 329 | } |
330 | if (start != qout->range[i].start >> PAGE_SHIFT) { | 330 | if (start != qout->range[i].start >> PAGE_SHIFT) { |
331 | rc = -ENOTSUPP; | 331 | rc = -EOPNOTSUPP; |
332 | goto out_free; | 332 | goto out_free; |
333 | } | 333 | } |
334 | start = (qout->range[i].end >> PAGE_SHIFT) + 1; | 334 | start = (qout->range[i].end >> PAGE_SHIFT) + 1; |
@@ -357,7 +357,7 @@ query_segment_type (struct dcss_segment *seg) | |||
357 | * -ENOSYS : we are not running on VM | 357 | * -ENOSYS : we are not running on VM |
358 | * -EIO : could not perform query diagnose | 358 | * -EIO : could not perform query diagnose |
359 | * -ENOENT : no such segment | 359 | * -ENOENT : no such segment |
360 | * -ENOTSUPP: multi-part segment cannot be used with linux | 360 | * -EOPNOTSUPP: multi-part segment cannot be used with linux |
361 | * -ENOMEM : out of memory | 361 | * -ENOMEM : out of memory |
362 | * 0 .. 6 : type of segment as defined in include/asm-s390/extmem.h | 362 | * 0 .. 6 : type of segment as defined in include/asm-s390/extmem.h |
363 | */ | 363 | */ |
@@ -515,7 +515,7 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long | |||
515 | * -ENOSYS : we are not running on VM | 515 | * -ENOSYS : we are not running on VM |
516 | * -EIO : could not perform query or load diagnose | 516 | * -EIO : could not perform query or load diagnose |
517 | * -ENOENT : no such segment | 517 | * -ENOENT : no such segment |
518 | * -ENOTSUPP: multi-part segment cannot be used with linux | 518 | * -EOPNOTSUPP: multi-part segment cannot be used with linux |
519 | * -ENOSPC : segment cannot be used (overlaps with storage) | 519 | * -ENOSPC : segment cannot be used (overlaps with storage) |
520 | * -EBUSY : segment can temporarily not be used (overlaps with dcss) | 520 | * -EBUSY : segment can temporarily not be used (overlaps with dcss) |
521 | * -ERANGE : segment cannot be used (exceeds kernel mapping range) | 521 | * -ERANGE : segment cannot be used (exceeds kernel mapping range) |
@@ -742,7 +742,7 @@ void segment_warning(int rc, char *seg_name) | |||
742 | pr_err("Loading or querying DCSS %s resulted in a " | 742 | pr_err("Loading or querying DCSS %s resulted in a " |
743 | "hardware error\n", seg_name); | 743 | "hardware error\n", seg_name); |
744 | break; | 744 | break; |
745 | case -ENOTSUPP: | 745 | case -EOPNOTSUPP: |
746 | pr_err("DCSS %s has multiple page ranges and cannot be " | 746 | pr_err("DCSS %s has multiple page ranges and cannot be " |
747 | "loaded or queried\n", seg_name); | 747 | "loaded or queried\n", seg_name); |
748 | break; | 748 | break; |