Re: [PATCH] ARCv2: Implement atomic64 based on LLOCKD/SCONDD instructions

2016-09-09 Thread Peter Zijlstra
On Thu, Sep 08, 2016 at 03:24:10PM -0700, Vineet Gupta wrote: > On 09/08/2016 12:29 PM, Vineet Gupta wrote: > > One thing I'm not sure of is the lack of explicit memory clobber in > > barrier-less ops e.g. atomic64_add() (BTW same is true for 32-bit > > atomic_add() as well). Per commit 398aa66827

Re: [PATCH] ARCv2: Implement atomic64 based on LLOCKD/SCONDD instructions

2016-09-08 Thread Vineet Gupta
On 09/08/2016 12:29 PM, Vineet Gupta wrote: > One thing I'm not sure of is the lack of explicit memory clobber in > barrier-less ops e.g. atomic64_add() (BTW same is true for 32-bit > atomic_add() as well). Per commit 398aa66827 ("ARM: 6212/1: atomic ops: > add memory constraints to inline asm ") W

[PATCH] ARCv2: Implement atomic64 based on LLOCKD/SCONDD instructions

2016-09-08 Thread Vineet Gupta
ARCv2 ISA provides 64-bit exclusive load/stores so use them to implement the 64-bit atomics and elide the spinlock based generic 64-bit atomics boot tested with atomic64 self-test (and GOD bless the person who wrote them, I realized my inline assmebly is sloppy as hell) One thing I'm not sure of