Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-04-18 Thread Vineet Gupta
On 03/21/2018 04:54 AM, Alexey Brodkin wrote: /* * This is only for old cores lacking LLOCK/SCOND, which by defintion @@ -60,23 +62,48 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new) /* Z indicates to userspace if operation succeded */

Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-04-18 Thread Vineet Gupta
On 03/21/2018 04:54 AM, Alexey Brodkin wrote: /* * This is only for old cores lacking LLOCK/SCOND, which by defintion @@ -60,23 +62,48 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new) /* Z indicates to userspace if operation succeded */

Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-04-04 Thread Alexey Brodkin
Hi Vineet, Peter, On Wed, 2018-03-21 at 14:54 +0300, Alexey Brodkin wrote: > Hi Vineet, > > On Mon, 2018-03-19 at 11:29 -0700, Vineet Gupta wrote: > > On 03/19/2018 04:00 AM, Alexey Brodkin wrote: > > > arc_usr_cmpxchg syscall is supposed to be used on platforms > > > that lack support of

Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-04-04 Thread Alexey Brodkin
Hi Vineet, Peter, On Wed, 2018-03-21 at 14:54 +0300, Alexey Brodkin wrote: > Hi Vineet, > > On Mon, 2018-03-19 at 11:29 -0700, Vineet Gupta wrote: > > On 03/19/2018 04:00 AM, Alexey Brodkin wrote: > > > arc_usr_cmpxchg syscall is supposed to be used on platforms > > > that lack support of

Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-03-21 Thread Alexey Brodkin
Hi Vineet, On Mon, 2018-03-19 at 11:29 -0700, Vineet Gupta wrote: > On 03/19/2018 04:00 AM, Alexey Brodkin wrote: > > arc_usr_cmpxchg syscall is supposed to be used on platforms > > that lack support of Load-Locked/Store-Conditional instructions > > in hardware. And in that case we mimic missing

Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-03-21 Thread Alexey Brodkin
Hi Vineet, On Mon, 2018-03-19 at 11:29 -0700, Vineet Gupta wrote: > On 03/19/2018 04:00 AM, Alexey Brodkin wrote: > > arc_usr_cmpxchg syscall is supposed to be used on platforms > > that lack support of Load-Locked/Store-Conditional instructions > > in hardware. And in that case we mimic missing

Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-03-19 Thread Vineet Gupta
On 03/19/2018 04:00 AM, Alexey Brodkin wrote: arc_usr_cmpxchg syscall is supposed to be used on platforms that lack support of Load-Locked/Store-Conditional instructions in hardware. And in that case we mimic missing hardware features with help of kernel's sycall that "atomically" checks current

Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-03-19 Thread Vineet Gupta
On 03/19/2018 04:00 AM, Alexey Brodkin wrote: arc_usr_cmpxchg syscall is supposed to be used on platforms that lack support of Load-Locked/Store-Conditional instructions in hardware. And in that case we mimic missing hardware features with help of kernel's sycall that "atomically" checks current