diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 16:16:37 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 16:16:37 (GMT) |
commit | 51d7cfc670e4c09e296af101326a6270060e72e7 (patch) | |
tree | d18858aacd9634b71f543f6a187f313950a13432 /arch/s390/hypfs/hypfs_diag.c | |
parent | 5983b125740553d08a67d0c57e8c1021f5a06e31 (diff) | |
parent | 3ecb0a5a7b567c9719d61938bcdba22938084b65 (diff) | |
download | linux-fsl-qoriq-51d7cfc670e4c09e296af101326a6270060e72e7.tar.xz |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] cio: deregister ccw device when pgid disband failed
[S390] cio: Use device_schedule_callback() for removing disconnected devices.
[S390] Fix section annotations.
[S390] raw3270: use mutex instead of semaphore
[S390] arch/s390/kernel/debug.c: use mutex instead of semaphore
[S390] dasd_eer: use mutex instead of semaphore
[S390] Add exception handler for diagnose 224
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 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; } |