diff options
author | Michael Holzheu <holzheu@de.ibm.com> | 2006-12-27 18:35:36 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-12-27 18:35:36 -0500 |
commit | aa77015c4e94cb1d30680646c163d7ae1f93f941 (patch) | |
tree | 39749592a4e74420d14c6a748a70dd7b22bbc91d /drivers/s390/cio/cio.c | |
parent | 524a237e4512038d6e07ad3b2e44e70902b76738 (diff) |
[S390] cio: fix stsch_reset.
Copy inline assembly of stsch and add "memory" to clobber list in order
to prevent gcc from optimizing away the checking of the global variable
"pgm_check_occured".
Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/cio.c')
-rw-r--r-- | drivers/s390/cio/cio.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 3a403f195cf8..b471ac4a1bf6 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -2,8 +2,7 @@ | |||
2 | * drivers/s390/cio/cio.c | 2 | * drivers/s390/cio/cio.c |
3 | * S/390 common I/O routines -- low level i/o calls | 3 | * S/390 common I/O routines -- low level i/o calls |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, | 5 | * Copyright (C) IBM Corp. 1999,2006 |
6 | * IBM Corporation | ||
7 | * Author(s): Ingo Adlung (adlung@de.ibm.com) | 6 | * Author(s): Ingo Adlung (adlung@de.ibm.com) |
8 | * Cornelia Huck (cornelia.huck@de.ibm.com) | 7 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
9 | * Arnd Bergmann (arndb@de.ibm.com) | 8 | * Arnd Bergmann (arndb@de.ibm.com) |
@@ -881,10 +880,18 @@ static void cio_reset_pgm_check_handler(void) | |||
881 | static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr) | 880 | static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr) |
882 | { | 881 | { |
883 | int rc; | 882 | int rc; |
883 | register struct subchannel_id reg1 asm ("1") = schid; | ||
884 | 884 | ||
885 | pgm_check_occured = 0; | 885 | pgm_check_occured = 0; |
886 | s390_reset_pgm_handler = cio_reset_pgm_check_handler; | 886 | s390_reset_pgm_handler = cio_reset_pgm_check_handler; |
887 | rc = stsch(schid, addr); | 887 | |
888 | asm volatile( | ||
889 | " stsch 0(%2)\n" | ||
890 | " ipm %0\n" | ||
891 | " srl %0,28" | ||
892 | : "=d" (rc) | ||
893 | : "d" (reg1), "a" (addr), "m" (*addr) : "memory", "cc"); | ||
894 | |||
888 | s390_reset_pgm_handler = NULL; | 895 | s390_reset_pgm_handler = NULL; |
889 | if (pgm_check_occured) | 896 | if (pgm_check_occured) |
890 | return -EIO; | 897 | return -EIO; |