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

Michael Ellerman michael at ellerman.id.au
Thu Jun 30 10:28:35 EST 2005


On Wed, 29 Jun 2005 01:05, Olof Johansson wrote:
> 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?

Yep, great minds think alike ;D
See my patch 17/17 ppc64: Replace custom locking code with a spinlock.

cheers

-- 
Michael Ellerman
IBM OzLabs

email: michael:ellerman.id.au
inmsg: mpe:jabber.org
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: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050630/20eda7ff/attachment.pgp 


More information about the Linuxppc64-dev mailing list