From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Michael Holzheu <holzheu@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 1/7] Add exception handler for diagnose 224
Date: Thu, 31 May 2007 16:20:25 +0200 [thread overview]
Message-ID: <20070531153436.830155646@de.ibm.com> (raw)
In-Reply-To: 20070531142024.011160634@de.ibm.com
[-- Attachment #1: 001-hypfs-fixup.diff --]
[-- Type: text/plain, Size: 1444 bytes --]
From: Michael Holzheu <holzheu@de.ibm.com>
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>
---
arch/s390/hypfs/hypfs_diag.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
Index: quilt-2.6/arch/s390/hypfs/hypfs_diag.c
===================================================================
--- quilt-2.6.orig/arch/s390/hypfs/hypfs_diag.c
+++ quilt-2.6/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;
}
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2007-05-31 15:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-31 14:20 [patch 0/7] s390 upstream patches Martin Schwidefsky
2007-05-31 14:20 ` Martin Schwidefsky [this message]
2007-05-31 14:20 ` [patch 2/7] dasd_eer: use mutex instead of semaphore Martin Schwidefsky
2007-05-31 14:20 ` [patch 3/7] arch/s390/kernel/debug.c: " Martin Schwidefsky
2007-05-31 14:20 ` [patch 4/7] raw3270: " Martin Schwidefsky
2007-05-31 14:20 ` [patch 5/7] Fix section annotations Martin Schwidefsky
2007-05-31 14:20 ` [patch 6/7] cio: Use device_schedule_callback() for removing disconnected devices Martin Schwidefsky
2007-05-31 14:20 ` [patch 7/7] cio: deregister ccw device when pgid disband failed Martin Schwidefsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070531153436.830155646@de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=holzheu@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox