summaryrefslogtreecommitdiff
path: root/arch/s390/hypfs/hypfs_diag.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-31 16:16:37 (GMT)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-31 16:16:37 (GMT)
commit51d7cfc670e4c09e296af101326a6270060e72e7 (patch)
treed18858aacd9634b71f543f6a187f313950a13432 /arch/s390/hypfs/hypfs_diag.c
parent5983b125740553d08a67d0c57e8c1021f5a06e31 (diff)
parent3ecb0a5a7b567c9719d61938bcdba22938084b65 (diff)
downloadlinux-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.c17
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;
}