From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Chuck Ebbert <76306.1226@compuserve.com>
Cc: Michael Holzheu <holzheu@de.ibm.com>, linux-kernel@vger.kernel.org
Subject: Re: [S390] cio: fix stsch_reset.
Date: Sun, 31 Dec 2006 13:07:25 +0100 [thread overview]
Message-ID: <1167566845.27664.8.camel@localhost> (raw)
In-Reply-To: <200612310135_MC3-1-D6D0-A862@compuserve.com>
On Sun, 2006-12-31 at 01:31 -0500, Chuck Ebbert wrote:
> > @@ -881,10 +880,18 @@ 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);
> > +
> > + asm volatile(
> > + " stsch 0(%2)\n"
> > + " ipm %0\n"
> > + " srl %0,28"
> > + : "=d" (rc)
> > + : "d" (reg1), "a" (addr), "m" (*addr) : "memory", "cc");
> > +
> > s390_reset_pgm_handler = NULL;
> > if (pgm_check_occured)
> > return -EIO;
>
>
> Can't you just put a barrier() before the stsch() call?
You mean after. We have to prevent the sequence
1) load pgm_check_occured,
2) stsch and the execution of cio_reset_pgm_check_handler
3) use of the the value loaded in 1)
A barrier before 2) forces a reload of pgm_check_occured but it does not
force the reload to be before the stsch call.
But the basic idea is valid. The standard stsch() inline followed by a
barrier() is equivalent to the new inline assembly.
--
blue skies,
Martin.
Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2006-12-31 12:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-31 6:31 [S390] cio: fix stsch_reset Chuck Ebbert
2006-12-31 12:07 ` Martin Schwidefsky [this message]
2006-12-31 12:22 ` Heiko Carstens
2007-01-08 9:54 ` Michael Holzheu
-- strict thread matches above, loose matches on Subject: below --
2006-12-28 10:39 Martin Schwidefsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1167566845.27664.8.camel@localhost \
--to=schwidefsky@de.ibm.com \
--cc=76306.1226@compuserve.com \
--cc=holzheu@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox