summaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorGerald Schaefer <geraldsc@de.ibm.com>2006-04-27 18:40:22 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-28 08:33:48 -0700
commit9b5dec1aa08b77c4217cd5fcaf1e4e177f659b2e (patch)
tree67dd2efc485f8c8aadf52cebf23f241777353776 /arch/s390/mm
parent2cc924b8ba1e9493ed50f5b793974e2427a15748 (diff)
downloadop-kernel-dev-9b5dec1aa08b77c4217cd5fcaf1e4e177f659b2e.zip
op-kernel-dev-9b5dec1aa08b77c4217cd5fcaf1e4e177f659b2e.tar.gz
[PATCH] s390: segment operation error codes
Print a warning with the z/VM error code if segment_load, segment_type or segment_save fail to ease the problem determination. Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/extmem.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c
index a9566bc..9b11e3e 100644
--- a/arch/s390/mm/extmem.c
+++ b/arch/s390/mm/extmem.c
@@ -192,6 +192,7 @@ query_segment_type (struct dcss_segment *seg)
diag_cc = dcss_diag (DCSS_SEGEXT, qin, &dummy, &vmrc);
if (diag_cc > 1) {
+ PRINT_WARN ("segment_type: diag returned error %ld\n", vmrc);
rc = dcss_diag_translate_rc (vmrc);
goto out_free;
}
@@ -553,7 +554,7 @@ segment_save(char *name)
int endpfn = 0;
char cmd1[160];
char cmd2[80];
- int i;
+ int i, response;
if (!MACHINE_IS_VM)
return;
@@ -576,8 +577,20 @@ segment_save(char *name)
segtype_string[seg->range[i].start & 0xff]);
}
sprintf(cmd2, "SAVESEG %s", name);
- cpcmd(cmd1, NULL, 0, NULL);
- cpcmd(cmd2, NULL, 0, NULL);
+ response = 0;
+ cpcmd(cmd1, NULL, 0, &response);
+ if (response) {
+ PRINT_ERR("segment_save: DEFSEG failed with response code %i\n",
+ response);
+ goto out;
+ }
+ cpcmd(cmd2, NULL, 0, &response);
+ if (response) {
+ PRINT_ERR("segment_save: SAVESEG failed with response code %i\n",
+ response);
+ goto out;
+ }
+out:
spin_unlock(&dcss_lock);
}
OpenPOWER on IntegriCloud