diff options
author | Michael Holzheu <holzheu@de.ibm.com> | 2007-05-31 11:38:01 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-05-31 11:38:10 -0400 |
commit | c41d4e3e688e338418311f449a4c68f6cb8eabbb (patch) | |
tree | 062f4431d9c2f3994009032eb32f3ad6877010d5 /arch/s390/hypfs/hypfs_diag.c | |
parent | 3f0a6766e0cc5a577805732e5adb50a585c58175 (diff) |
[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 <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/hypfs/hypfs_diag.c')
-rw-r--r-- | 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 2782cf9da5b4..b9a1ce1f28e4 100644 --- a/arch/s390/hypfs/hypfs_diag.c +++ b/arch/s390/hypfs/hypfs_diag.c | |||
@@ -481,9 +481,17 @@ out: | |||
481 | 481 | ||
482 | /* Diagnose 224 functions */ | 482 | /* Diagnose 224 functions */ |
483 | 483 | ||
484 | static void diag224(void *ptr) | 484 | static int diag224(void *ptr) |
485 | { | 485 | { |
486 | asm volatile("diag %0,%1,0x224" : :"d" (0), "d"(ptr) : "memory"); | 486 | int rc = -ENOTSUPP; |
487 | |||
488 | asm volatile( | ||
489 | " diag %1,%2,0x224\n" | ||
490 | "0: lhi %0,0x0\n" | ||
491 | "1:\n" | ||
492 | EX_TABLE(0b,1b) | ||
493 | : "+d" (rc) :"d" (0), "d" (ptr) : "memory"); | ||
494 | return rc; | ||
487 | } | 495 | } |
488 | 496 | ||
489 | static int diag224_get_name_table(void) | 497 | static int diag224_get_name_table(void) |
@@ -492,7 +500,10 @@ static int diag224_get_name_table(void) | |||
492 | diag224_cpu_names = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA); | 500 | diag224_cpu_names = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA); |
493 | if (!diag224_cpu_names) | 501 | if (!diag224_cpu_names) |
494 | return -ENOMEM; | 502 | return -ENOMEM; |
495 | diag224(diag224_cpu_names); | 503 | if (diag224(diag224_cpu_names)) { |
504 | kfree(diag224_cpu_names); | ||
505 | return -ENOTSUPP; | ||
506 | } | ||
496 | EBCASC(diag224_cpu_names + 16, (*diag224_cpu_names + 1) * 16); | 507 | EBCASC(diag224_cpu_names + 16, (*diag224_cpu_names + 1) * 16); |
497 | return 0; | 508 | return 0; |
498 | } | 509 | } |