[Cbe-oss-dev] [PATCH 2:9] spufs: Fix spu status read in spu_stopped()
Benjamin Herrenschmidt
benh at kernel.crashing.org
Thu Jun 5 14:14:13 EST 2008
On Wed, 2008-06-04 at 13:29 +0000, Luke Browning wrote:
> On Wed, 2008-06-04 at 11:49 +0800, Jeremy Kerr wrote:
> > Hi Luke,
> >
> > > + /* Ensure that all spu status bits have been updated */
> > > + eieio();
> > > +
> > > +top:
> > > + *stat = ctx->ops->status_read(ctx);
> >
> > should the eieio() be repeated for each status read? (ie, have the top:
> > label before the eieio)
>
> No. eieio() must be reliable. Otherwise it is worthless.
Ugh ?
What do you mean ?
If you needed that eieio at all in the first place, then yes, you
would probably need it only once, but this has nothing to do with
being "reliable" :-) It's purely due to the fact that the loop isn't
doing any relevant operations that might be re-ordered with that load,
and so subsequent loads from the same place don't need another eieio.
However, I strongly suspect that status_read implementation uses
one of the in_* accessors which will already do the necessary barrier.
Ben.
More information about the cbe-oss-dev
mailing list