Date: Tue, 11 Oct 2011 22:50:06 GMT From: Ian Lepore <freebsd@damnhippie.dyndns.org> To: freebsd-arm@FreeBSD.org Subject: Re: arm/161498: [patch] ARM RAS code can fail to restart an atomic sequence. Message-ID: <201110112250.p9BMo6AB049691@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR arm/161498; it has been noted by GNATS. From: Ian Lepore <freebsd@damnhippie.dyndns.org> To: Mark Tinguely <marktinguely@gmail.com> Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: arm/161498: [patch] ARM RAS code can fail to restart an atomic sequence. Date: Tue, 11 Oct 2011 16:29:08 -0600 On Tue, 2011-10-11 at 17:13 -0500, Mark Tinguely wrote: > On 10/11/2011 12:42 PM, Ian Lepore wrote: > Does the RAS_END comparison buy us anything? At this point. > > RAS_END == 0xffff_ffff when interrupt is between step 1 and 2 > RAS_END == address of step 5 > > In both cases, (PC <= RAS_END) > > --Mark. The RAS_END comparison is still needed to ensure idempotence of the atomic sequence. Once the PC passes the "final store" of the atomic sequence an interrupt must not cause a restart of the sequence, but until the zero is successfully stored into RAS_START the possibility of a restart is still in play, so it's the RAS_END comparison that covers the case of an interrupt while tearing down the RAS mechanism. Oh! I just re-read your quoted text above... an important distinction is that RAS_END is the address of step 4, not step 5. In the asm code it has to be the address of the next instruction after the one that makes the final modification of the memory value being protected by the sequence. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110112250.p9BMo6AB049691>