[PATCH 2/2] ARM: include: asm: use 'int' instead of 'unsigned long' for normal register variables within atomic.h

Will Deacon will.deacon at arm.com
Fri Oct 4 11:42:08 EDT 2013


On Fri, Oct 04, 2013 at 04:37:42PM +0100, Will Deacon wrote:
> On Fri, Oct 04, 2013 at 10:51:56AM +0100, Chen Gang wrote:
> > On 10/04/2013 12:32 AM, Will Deacon wrote:
> > > The problem with arm64 is that we're using *unsigned long* for 32-bit
> > > clear_mask, which is definitely wrong because it's 64-bit (another patch to
> > > fix this!).
> > > 
> > 
> > At least, that is not a bug.
> 
> Sure it is. What if the adjacent 32-bit value was being accessed by another
> CPU under a spinlock?

(Oh, ok, that would still work on arm because of the way the exclusive
monitor is implemented, but we shouldn't rely on that).

Will



More information about the linux-arm-kernel mailing list