@@ -15,6 +15,7 @@ config PARISC
select ARCH_HAS_STRICT_MODULE_RWX
select ARCH_HAS_UBSAN
select ARCH_HAS_PTE_SPECIAL
+ select ARCH_NEED_CMPXCHG_1_2_EMU
select ARCH_NO_SG_CHAIN
select ARCH_SUPPORTS_HUGETLBFS if PA20
select ARCH_SUPPORTS_MEMORY_FAILURE
@@ -72,6 +72,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
#endif
case 4: return __cmpxchg_u32((unsigned int *)ptr,
(unsigned int)old, (unsigned int)new_);
+ case 2: return cmpxchg_emu_u16((volatile u16 *)ptr, old, new);
case 1: return __cmpxchg_u8((u8 *)ptr, old & 0xff, new_ & 0xff);
}
__cmpxchg_called_with_bad_pointer();
Use the new cmpxchg_emu_u16() to emulate two-byte cmpxchg() on parisc. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Helge Deller <deller@gmx.de> Cc: Palmer Dabbelt <palmer@rivosinc.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org> Cc: Andrzej Hajda <andrzej.hajda@intel.com> Cc: <linux-parisc@vger.kernel.org> --- arch/parisc/Kconfig | 1 + arch/parisc/include/asm/cmpxchg.h | 1 + 2 files changed, 2 insertions(+)