Skip to content

Commit

Permalink
[S390] cio: use barrier() in stsch_reset.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jan 9, 2007
1 parent dd401e2 commit 6faf444
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions drivers/s390/cio/cio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6faf444

Please sign in to comment.