Re: [RFC PATCH 01/15] cmpxchg_local() is not signed-value safe, so fix generic atomics

2016-05-18 Thread Arnd Bergmann
On Wednesday 18 May 2016 16:10:45 David Howells wrote: > cmpxchg_local() is not signed-value safe because on a 64-bit machine signed > int arguments to it may be sign-extended to signed long _before_ begin cast > to unsigned long. This potentially causes comparisons to fail when dealing > with

Re: [RFC PATCH 01/15] cmpxchg_local() is not signed-value safe, so fix generic atomics

2016-05-18 Thread Arnd Bergmann
On Wednesday 18 May 2016 16:10:45 David Howells wrote: > cmpxchg_local() is not signed-value safe because on a 64-bit machine signed > int arguments to it may be sign-extended to signed long _before_ begin cast > to unsigned long. This potentially causes comparisons to fail when dealing > with

[RFC PATCH 01/15] cmpxchg_local() is not signed-value safe, so fix generic atomics

2016-05-18 Thread David Howells
cmpxchg_local() is not signed-value safe because on a 64-bit machine signed int arguments to it may be sign-extended to signed long _before_ begin cast to unsigned long. This potentially causes comparisons to fail when dealing with negative values. Fix the generic atomic functions that are

[RFC PATCH 01/15] cmpxchg_local() is not signed-value safe, so fix generic atomics

2016-05-18 Thread David Howells
cmpxchg_local() is not signed-value safe because on a 64-bit machine signed int arguments to it may be sign-extended to signed long _before_ begin cast to unsigned long. This potentially causes comparisons to fail when dealing with negative values. Fix the generic atomic functions that are