Using __kuser_cmpxchg

Nicolas Pitre nico@cam.org
Fri Nov 16 14:31:00 GMT 2007


On 2007年11月16日, Paul Brook wrote:
> > > > On a pre-ARMv6 processor
> > >
> > > Similar "spurious" failures can happen on ARMv6 processors.
> > >
> > > ARMv6 cpus don't have atomic operations either. They have ldrex/strex,
> > > where the latter will fail if another CPU modifies the memory *or* a
> > > context switch occurs.
> >
> > Due to the current implementation this is indeed true.
> >
> > ARMv6 is more trivial to fix though, since the operation can be
> > reattempted whenever the strex fails.
>> I'm confused. Why is this any different to ARMv5? AFAICS the two kuser_cmpxchg 
> implementations are functionally equivalent.

Yes they are. My point is that fixing the ARMv6 one to eliminate the 
false negative is almost trivial. The pre-ARMv6 is not so trivial 
though. And I don't want to change the interface of course.
I implemented a fix here but I still want to think it through so not to 
miss some implications wrt page faults for example.
Nicolas


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /