fsl booke MM vs. SMP questions

Gabriel Paubert paubert at iram.es
Tue May 22 20:02:12 EST 2007


On Tue, May 22, 2007 at 07:14:38PM +1000, Benjamin Herrenschmidt wrote:
> > Why do you want to clear the reservation here? 
> > 
> > Coming out of some code path with the reservation still held 
> > can only affect buggy code (someone doing st[dw]cx. before 
> > l[dw]arx) AFAIK.
> 
> And buggy CPUs :-)
> 
> Seriously, lots of CPU implementations don't test the address for local
> lwarx stwcx. so if your kernel code "replaces" a reservation with
> another that is left set, the userland stwcx. might well succeed which
> is bogus.
> 

Well, there should always be an stwcx. to clear reservation before
any interrupt return. Otherwise you'll be able to cause hard to
reproduce bugs in the interrupted code.

Checking or not that the reservation address matches the stwcx.
is irrelevant.

	Gabriel



More information about the Linuxppc-dev mailing list