* [S390] cio: use barrier() in stsch_reset.
@ 2007-01-07 10:43 Martin Schwidefsky
0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2007-01-07 10:43 UTC (permalink / raw)
To: linux-kernel, heiko.carstens
From: Heiko Carstens <heiko.carstens@de.ibm.com>
[S390] cio: use barrier() in stsch_reset.
Use barrier() in stsch_reset() instead of duplicating the stsch()
inline assembly and adding "memory" to the clobberlist.
Pointed out by Chuck Ebbert.
Real fix would be to add a fixup section to the stsch() and extend the
basic program check handler so it searches the exception tables in case
of a program check.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/cio/cio.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff -urpN linux-2.6/drivers/s390/cio/cio.c linux-2.6-patched/drivers/s390/cio/cio.c
--- linux-2.6/drivers/s390/cio/cio.c 2007-01-06 15:20:12.000000000 +0100
+++ linux-2.6-patched/drivers/s390/cio/cio.c 2007-01-06 15:20:31.000000000 +0100
@@ -880,19 +880,15 @@ static void cio_reset_pgm_check_handler(
static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr)
{
int rc;
- register struct subchannel_id reg1 asm ("1") = schid;
pgm_check_occured = 0;
s390_reset_pgm_handler = cio_reset_pgm_check_handler;
+ rc = stsch(schid, addr);
+ s390_reset_pgm_handler = NULL;
- asm volatile(
- " stsch 0(%2)\n"
- " ipm %0\n"
- " srl %0,28"
- : "=d" (rc)
- : "d" (reg1), "a" (addr), "m" (*addr) : "memory", "cc");
+ /* The program check handler could have changed pgm_check_occured */
+ barrier();
- s390_reset_pgm_handler = NULL;
if (pgm_check_occured)
return -EIO;
else
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-07 10:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-07 10:43 [S390] cio: use barrier() in stsch_reset Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®