powerpc: add compile-time support for lbarx, lharx
authorNicholas Piggin <npiggin@gmail.com>
Fri, 9 Sep 2022 05:23:12 +0000 (15:23 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Nov 2022 12:31:47 +0000 (23:31 +1100)
commitb86cf14f240e002e001fd4f2bf49114c7836fd5c
tree40f979d9e82642c1f7d0a16578f0de5ed2113975
parentff8fae94e26f5cd2779ceda0ee6d714a10501abd
powerpc: add compile-time support for lbarx, lharx

ISA v2.06 (POWER7 and up) as well as e6500 support lbarx and lharx.
Add a compile option that allows code to use it, and add support in
cmpxchg and xchg 8 and 16 bit values without shifting and masking.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220909052312.63916-1-npiggin@gmail.com
arch/powerpc/Kconfig
arch/powerpc/include/asm/cmpxchg.h
arch/powerpc/lib/sstep.c
arch/powerpc/platforms/Kconfig.cputype