]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/s390/mm/extmem.c
[PATCH] s390: segment operation error codes
[linux-2.6-omap-h63xx.git] / arch / s390 / mm / extmem.c
index 506a33b51e4f789317a3a854fb7eef9221aa7827..9b11e3e20903f0305916fcd6e6037a71cefdf43f 100644 (file)
@@ -143,7 +143,7 @@ dcss_diag (__u8 func, void *parameter,
        rx = (unsigned long) parameter;
        ry = (unsigned long) func;
        __asm__ __volatile__(
-#ifdef CONFIG_ARCH_S390X
+#ifdef CONFIG_64BIT
                "   sam31\n" // switch to 31 bit
                "   diag    %0,%1,0x64\n"
                "   sam64\n" // switch back to 64 bit
@@ -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);
 }