]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/cmpxchg: Implement arch_xchg() with arch_try_cmpxchg()
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 6 Nov 2024 10:03:08 +0000 (11:03 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 12 Nov 2024 13:01:28 +0000 (14:01 +0100)
commit0e7d3baa71165a3fbf26206d69355eda0a1d993b
tree5549cbb596566b0b3bc6c2696697bef7b5d72e4a
parent0b6de9aec285d24d49a918d52915ed231b2d9e87
s390/cmpxchg: Implement arch_xchg() with arch_try_cmpxchg()

Get rid of the arch_xchg() inline assemblies by converting the inline
assemblies to C functions which make use of arch_try_cmpxchg().

With flag output operand support the generated code is at least as good as
the previous version. Without it is slightly worse, however getting rid of
all the inline assembly code is worth it.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/cmpxchg.h