Re: [PATCH] alpha: spinlock: don't perform memory access in locked critical section

2013-05-06 Thread Will Deacon
On Mon, May 06, 2013 at 10:12:38PM +0100, Will Deacon wrote: > The other (hopefully also wrong) worry that I had was when the manual > states that: > > `If the virtual and physical addresses for a LDx_L and STx_C sequence are > not within the same naturally aligned 16-byte sections of virtual and

Re: [PATCH] alpha: spinlock: don't perform memory access in locked critical section

2013-05-06 Thread Måns Rullgård
Will Deacon writes: > Hi Al, Matt, > > On Mon, May 06, 2013 at 09:53:30PM +0100, Al Viro wrote: >> On Mon, May 06, 2013 at 01:19:51PM -0700, Matt Turner wrote: >> >> > I'm not sure of the interpretation that LDA counts as a memory access. >> > >> > The manual says it's Ra <- Rbv + SEXT(disp). >

Re: [PATCH] alpha: spinlock: don't perform memory access in locked critical section

2013-05-06 Thread Will Deacon
Hi Al, Matt, On Mon, May 06, 2013 at 09:53:30PM +0100, Al Viro wrote: > On Mon, May 06, 2013 at 01:19:51PM -0700, Matt Turner wrote: > > > I'm not sure of the interpretation that LDA counts as a memory access. > > > > The manual says it's Ra <- Rbv + SEXT(disp). > > > > It's not touching memory

Re: [PATCH] alpha: spinlock: don't perform memory access in locked critical section

2013-05-06 Thread Al Viro
On Mon, May 06, 2013 at 01:19:51PM -0700, Matt Turner wrote: > I'm not sure of the interpretation that LDA counts as a memory access. > > The manual says it's Ra <- Rbv + SEXT(disp). > > It's not touching memory that I can see. More to the point, the same manual gives explicit list of instructi

Re: [PATCH] alpha: spinlock: don't perform memory access in locked critical section

2013-05-06 Thread Al Viro
On Mon, May 06, 2013 at 09:01:05PM +0100, Will Deacon wrote: > The Alpha Architecture Reference Manual states that any memory access > performed between an LD_xL and a STx_C instruction may cause the > store-conditional to fail unconditionally and, as such, `no useful > program should do this'. >

Re: [PATCH] alpha: spinlock: don't perform memory access in locked critical section

2013-05-06 Thread Matt Turner
On Mon, May 6, 2013 at 1:01 PM, Will Deacon wrote: > The Alpha Architecture Reference Manual states that any memory access > performed between an LD_xL and a STx_C instruction may cause the > store-conditional to fail unconditionally and, as such, `no useful > program should do this'. > > Linux is

[PATCH] alpha: spinlock: don't perform memory access in locked critical section

2013-05-06 Thread Will Deacon
The Alpha Architecture Reference Manual states that any memory access performed between an LD_xL and a STx_C instruction may cause the store-conditional to fail unconditionally and, as such, `no useful program should do this'. Linux is a useful program, so fix up the Alpha spinlock implementation