On 2018-06-04 13:48:52 [+0200], Peter Zijlstra wrote:
On Mon, Jun 04, 2018 at 12:27:57PM +0200, Sebastian Andrzej Siewior wrote:
quoted
I just looked at Alpha's atomic_dec_and_lock assembly and did something
that should work for atomic_dec_and_lock_irqsave. I think it works but I
would prefer for someone from the Alpha-Camp to ack this before it goes
in. It is not critical because the non-optimized version should work.
I would vote to simply delete this entire file and get alpha on the
generic code.
Afaict, this asm gets the ordering wrong, and I doubt it is much faster
than using atomic_add_unless() in any case (+- the ordering of course).
I *think* the Alpha version is slightly wrong here. It does
load
dec by one
cmpeq
while the __atomic_add_unless() implementation does
load
cmpeq
which is the right thing (unless I can't parse the assembly properly).
Sebastian