Re: linux-2.6: [s390] kernel panic while loading initramfs (hercules emulator)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Could you please check, if the following patch fixes your problem?

Michael

Index: hypfs_diag.c
===================================================================
RCS file: /home/cvs/linux-2.5/arch/s390/hypfs/hypfs_diag.c,v
retrieving revision 1.10
diff -a -u -r1.10 hypfs_diag.c
--- hypfs_diag.c  8 Dec 2006 16:31:51 -0000     1.10
+++ hypfs_diag.c  21 May 2007 15:37:21 -0000
@@ -481,9 +481,17 @@

 /* Diagnose 224 functions */

-static void diag224(void *ptr)
+static int diag224(void *ptr)
 {
-     asm volatile("diag %0,%1,0x224" : :"d" (0), "d"(ptr) : "memory");
+     int rc = -ENOTSUPP;
+
+     asm volatile(
+           "     diag  %1,%2,0x224\n"
+           "0:   lhi   %0,0x0\n"
+           "1:\n"
+           EX_TABLE(0b,1b)
+           : "+d" (rc) :"d" (0), "d" (ptr) : "memory");
+     return rc;
 }

 static int diag224_get_name_table(void)
@@ -492,7 +500,10 @@
      diag224_cpu_names = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA);
      if (!diag224_cpu_names)
            return -ENOMEM;
-     diag224(diag224_cpu_names);
+     if (diag224(diag224_cpu_names)) {
+           kfree(diag224_cpu_names);
+           return -ENOTSUPP;
+     }
      EBCASC(diag224_cpu_names + 16, (*diag224_cpu_names + 1) * 16);
      return 0;
 }


(See attached file: hypfs_diag224.diff)

Attachment: hypfs_diag224.diff
Description: Binary data


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux