aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/cio.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2007-01-09 04:18:41 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-01-09 04:18:41 -0500
commit6faf4444f2445b068a4f75a86ae81b104c0eed2c (patch)
tree4a8aa9cc9d0f9538ee19847e762e612069699da6 /drivers/s390/cio/cio.c
parentdd401e2b9250e3bb07ef388ddccbbf80aa106fc7 (diff)
[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>
Diffstat (limited to 'drivers/s390/cio/cio.c')
-rw-r--r--drivers/s390/cio/cio.c12
1 files changed, 4 insertions, 8 deletions
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)
880static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr) 880static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr)
881{ 881{
882 int rc; 882 int rc;
883 register struct subchannel_id reg1 asm ("1") = schid;
884 883
885 pgm_check_occured = 0; 884 pgm_check_occured = 0;
886 s390_reset_pgm_handler = cio_reset_pgm_check_handler; 885 s390_reset_pgm_handler = cio_reset_pgm_check_handler;
886 rc = stsch(schid, addr);
887 s390_reset_pgm_handler = NULL;
887 888
888 asm volatile( 889 /* The program check handler could have changed pgm_check_occured */
889 " stsch 0(%2)\n" 890 barrier();
890 " ipm %0\n"
891 " srl %0,28"
892 : "=d" (rc)
893 : "d" (reg1), "a" (addr), "m" (*addr) : "memory", "cc");
894 891
895 s390_reset_pgm_handler = NULL;
896 if (pgm_check_occured) 892 if (pgm_check_occured)
897 return -EIO; 893 return -EIO;
898 else 894 else