Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-06-19 Thread Peter Zijlstra
On Mon, Mar 19, 2018 at 02:00:02PM +0300, Alexey Brodkin wrote: > diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c > index 5ac3b547453f..d7d3e16133d6 100644 > --- a/arch/arc/kernel/process.c > +++ b/arch/arc/kernel/process.c > @@ -47,7 +47,9 @@ SYSCALL_DEFINE0(arc_gettls) > SYSCA

Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-06-19 Thread Alexey Brodkin
Hi Vineet, On Wed, 2018-04-18 at 11:16 -0700, Vineet Gupta wrote: > 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, >

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 */ regs->s

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 Load-Lo

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 h

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