powerpc/qspinlock: convert atomic operations to assembly
authorNicholas Piggin <npiggin@gmail.com>
Sat, 26 Nov 2022 09:59:18 +0000 (19:59 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 2 Dec 2022 06:48:49 +0000 (17:48 +1100)
commitb3a73b7db2b6cb3b2e5bfda5518a0e92230ef673
tree4bf95333579c1592cd0ee45094c609b1ccb96272
parent4c93c2e4b9e8988511c06b9c042f23d4b8f593ad
powerpc/qspinlock: convert atomic operations to assembly

This uses more optimal ll/sc style access patterns (rather than
cmpxchg), and also sets the EH=1 lock hint on those operations
which acquire ownership of the lock.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221126095932.1234527-4-npiggin@gmail.com
arch/powerpc/include/asm/qspinlock.h
arch/powerpc/include/asm/qspinlock_types.h
arch/powerpc/lib/qspinlock.c