From 6faf4444f2445b068a4f75a86ae81b104c0eed2c Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Tue, 9 Jan 2007 10:18:41 +0100 Subject: [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 Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/cio.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index b471ac4a1bf6..ae1bf231d089 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -880,19 +880,15 @@ static void cio_reset_pgm_check_handler(void) 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 -- cgit v1.2.2 From bf3dbdcd0bfca74c16ad0b2b5a978907c864ed4c Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Tue, 9 Jan 2007 10:19:03 +0100 Subject: [S390] locking problem with __cpcmd. Changeset 740b5706b9c4b3767f597b3ea76654c6f2a800b2 moved the protecting spinlock from __cpcmd to cpcmd. Therefore vmcp can no longer use __cpcmd, instead we have to use cpcmd. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- drivers/s390/char/vmcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 1678b6c757ec..a420cd099041 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c @@ -117,7 +117,7 @@ vmcp_write(struct file *file, const char __user * buff, size_t count, return -ENOMEM; } debug_text_event(vmcp_debug, 1, cmd); - session->resp_size = __cpcmd(cmd, session->response, + session->resp_size = cpcmd(cmd, session->response, session->bufsize, &session->resp_code); up(&session->mutex); -- cgit v1.2.2