Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c41d4e3e688e338418311f449a4c68f6cb8eabbb
Commit:     c41d4e3e688e338418311f449a4c68f6cb8eabbb
Parent:     3f0a6766e0cc5a577805732e5adb50a585c58175
Author:     Michael Holzheu <[EMAIL PROTECTED]>
AuthorDate: Thu May 31 17:38:01 2007 +0200
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Thu May 31 17:38:10 2007 +0200

    [S390] Add exception handler for diagnose 224
    
    To be able to run with the diagnose 224 switched off, a potential
    specification exception has to be handled.
    
    Signed-off-by: Michael Holzheu <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 arch/s390/hypfs/hypfs_diag.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c
index 2782cf9..b9a1ce1 100644
--- a/arch/s390/hypfs/hypfs_diag.c
+++ b/arch/s390/hypfs/hypfs_diag.c
@@ -481,9 +481,17 @@ out:
 
 /* 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 @@ static int diag224_get_name_table(void)
        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;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to