[Cbe-oss-dev] [PATCH 2:9] spufs: Fix spu status read in spu_stopped()
Luke Browning
lukebr at linux.vnet.ibm.com
Wed Jun 4 23:29:02 EST 2008
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.
>
> > + if (*stat & stopped) {
> > + /*
> > + * If the spu hasn't finished stopping, we need to
> > + * re-read the register to get the stopped value.
> > + */
> > + if (*stat & SPU_STATUS_RUNNING)
> > + goto top;
>
> cpu_relax() ?
not necessary.
Luke
More information about the cbe-oss-dev
mailing list