Re: [PATCH] powerpc: introduce {cmp}xchg for u8 and u16

2016-04-18 Thread Pan Xinhui
On 2016年04月17日 03:43, Arnd Bergmann wrote: > On Wednesday 13 April 2016 19:15:17 Pan Xinhui wrote: >> Hello Peter, >> >> On 2016年04月12日 22:30, Peter Zijlstra wrote: >>> On Sun, Apr 10, 2016 at 10:17:28PM +0800, Pan Xinhui wrote: On 2016年04月08日 15:47, Peter Zijlstra wrote: > On Fri,

Re: [PATCH] powerpc: introduce {cmp}xchg for u8 and u16

2016-04-16 Thread Arnd Bergmann
On Wednesday 13 April 2016 19:15:17 Pan Xinhui wrote: > Hello Peter, > > On 2016年04月12日 22:30, Peter Zijlstra wrote: > > On Sun, Apr 10, 2016 at 10:17:28PM +0800, Pan Xinhui wrote: > >> > >> On 2016年04月08日 15:47, Peter Zijlstra wrote: > >>> On Fri, Apr 08, 2016 at 02:41:46PM +0800, Pan Xinhui wrot

Re: [PATCH] powerpc: introduce {cmp}xchg for u8 and u16

2016-04-14 Thread Pan Xinhui
Hello, Waiman On 2016年04月13日 23:53, Waiman Long wrote: > On 04/13/2016 07:15 AM, Pan Xinhui wrote: >> Hello Peter, >> >> On 2016年04月12日 22:30, Peter Zijlstra wrote: >> I am working on the qspinlock implementation on PPC. Your and Waiman's patches are so nice. :) >>> Thanks!, last time I

Re: [PATCH] powerpc: introduce {cmp}xchg for u8 and u16

2016-04-13 Thread Waiman Long
On 04/13/2016 07:15 AM, Pan Xinhui wrote: Hello Peter, On 2016年04月12日 22:30, Peter Zijlstra wrote: I am working on the qspinlock implementation on PPC. Your and Waiman's patches are so nice. :) Thanks!, last time I looked at PPC spinlocks they could not use things like ticket locks because PP

Re: [PATCH] powerpc: introduce {cmp}xchg for u8 and u16

2016-04-13 Thread Pan Xinhui
Hello Peter, On 2016年04月12日 22:30, Peter Zijlstra wrote: > On Sun, Apr 10, 2016 at 10:17:28PM +0800, Pan Xinhui wrote: >> >> On 2016年04月08日 15:47, Peter Zijlstra wrote: >>> On Fri, Apr 08, 2016 at 02:41:46PM +0800, Pan Xinhui wrote: From: pan xinhui Implement xchg{u8,u16}{local,rel

Re: [PATCH] powerpc: introduce {cmp}xchg for u8 and u16

2016-04-12 Thread Peter Zijlstra
On Sun, Apr 10, 2016 at 10:17:28PM +0800, Pan Xinhui wrote: > > On 2016年04月08日 15:47, Peter Zijlstra wrote: > > On Fri, Apr 08, 2016 at 02:41:46PM +0800, Pan Xinhui wrote: > >> From: pan xinhui > >> > >> Implement xchg{u8,u16}{local,relaxed}, and > >> cmpxchg{u8,u16}{,local,acquire,relaxed}. > >>

Re: [PATCH] powerpc: introduce {cmp}xchg for u8 and u16

2016-04-10 Thread Pan Xinhui
On 2016年04月08日 15:47, Peter Zijlstra wrote: > On Fri, Apr 08, 2016 at 02:41:46PM +0800, Pan Xinhui wrote: >> From: pan xinhui >> >> Implement xchg{u8,u16}{local,relaxed}, and >> cmpxchg{u8,u16}{,local,acquire,relaxed}. >> >> Atomic operation on 8-bit and 16-bit data type is supported from power7

Re: [PATCH] powerpc: introduce {cmp}xchg for u8 and u16

2016-04-08 Thread Peter Zijlstra
On Fri, Apr 08, 2016 at 02:41:46PM +0800, Pan Xinhui wrote: > From: pan xinhui > > Implement xchg{u8,u16}{local,relaxed}, and > cmpxchg{u8,u16}{,local,acquire,relaxed}. > > Atomic operation on 8-bit and 16-bit data type is supported from power7 And yes I see nothing P7 specific here, this imple

[PATCH] powerpc: introduce {cmp}xchg for u8 and u16

2016-04-07 Thread Pan Xinhui
From: pan xinhui Implement xchg{u8,u16}{local,relaxed}, and cmpxchg{u8,u16}{,local,acquire,relaxed}. Atomic operation on 8-bit and 16-bit data type is supported from power7 Signed-off-by: pan xinhui --- arch/powerpc/include/asm/cmpxchg.h | 265 + 1 file cha