[PATCH 4/15] ppc64: Don't pass the pointers to xItLpQueue around

Olof Johansson olof at lixom.net
Wed Jun 29 01:05:09 EST 2005


On Tue, Jun 28, 2005 at 02:42:31PM +1000, Stephen Rothwell wrote:
> Hi Michael,
> 
> On Tue, 28 Jun 2005 09:17:17 +1000 Michael Ellerman <michael at ellerman.id.au> wrote:
> >
> >  	int t;
> > -	u32 * inUseP = &(lpQueue->xInUseWord);
> > +	u32 * inUseP = &xItLpQueue.xInUseWord;
> >  
> >  	__asm__ __volatile__("\n\
> >  1:	lwarx	%0,0,%2		\n\
> > @@ -31,37 +31,37 @@ static __inline__ int set_inUse( struct 
> >  	stwcx.	%0,0,%2		\n\
> >  	bne-	1b		\n\
> >  2:	eieio"
> 
> Could you fix this assembler code up so that it is a set of concatenated
> strings rather than one longe one, please?  I think that is the preferred
> formatting these days.

Actually, this is a once-used block of assembly that, as far as I can
tell, essentially does a cmpxchg() on a 32-bit value, does it not?

How about axing the function alltogether and/or use cmpxchg() instead?


-Olof



More information about the Linuxppc64-dev mailing list