TL;DR
Linux developer Paul E. McKenney says Linux 7.4 adds a function to emulate two-byte cmpxchg() for specific CPU architectures and notes that older hardware may soon lose kernel support.
Linux developer Paul E. McKenney says Linux 7.4 includes a new cmpxchg_emu_u16() function. This function emulates two-byte cmpxchg() using four-byte cmpxchg() for architectures that lack native instructions. The emulation is intended for use in the SH, ARC, CSKY, and Xtensa CPU ports.
McKenney says this change allows two-byte cmpxchg() to be used throughout common Linux kernel code because it can be safely assumed to be supported everywhere. However, he notes that this does not make implementing all algorithms requiring two-byte atomic operations easy. This is because some systems currently supported by Linux do not have native two-byte store instructions. McKenney suggests that the kernel might soon drop support for such hardware.
