[Cbe-oss-dev] [PATCH 3:10] spufs: fix spu status read in spu_stopped()

Michael Ellerman michael at ellerman.id.au
Fri May 23 11:22:28 EST 2008


On Thu, 2008-05-22 at 20:09 +0000, Luke Browning wrote:
> Fix spu status read in spu_stopped()
> 
> If the spu is stopping, re-read the register to get the stopped value.
> SPU status is a loop control variable in the calling routine.
> 
> Changed loop style based on Christoph Hellwig's comment.  
> 
> Added smp_wmb (lwsync) per CBEA specification of spu status register read.

What happens if I build a UP kernel, smp_wmb() will degenerate to a
compiler barrier, is that what you want to happen?

And isn't smp_wmb() == eieio()? Or was it changed recently? Either way
if the spec says you need an lwsync I think you should use exactly that,
not some macro that could be changed in future.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/cbe-oss-dev/attachments/20080523/841f8c02/attachment.pgp>


More information about the cbe-oss-dev mailing list