mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PULL] Add two-byte cmpxchg emulation function for v7.4
@ 2026-10-17  3:51 Paul E. McKenney
  2026-10-20 18:48 ` John Paul Adrian Glaubitz
  2026-10-21  1:08 ` pr-tracker-bot
  0 siblings, 2 replies; 7+ messages in thread
From: Paul E. McKenney @ 2026-10-17  3:51 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, kernel-team, Bradley Morgan, Arnd Bergmann

Hello, Linus,

When the v7.4 merge window opens, please pull this two-byte cmpxchg
emulation:

  git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git tags/cmpxchg-emu.2026.10.12b
  # HEAD: 558ccc91ddf98d58ae726ed7ccaf5838f284084f: xtensa: Emulate two-byte cmpxchg (2026-10-12 16:36:53 -0700)

----------------------------------------------------------------
Add emulation of two-byte cmpxchg()

These commits add a cmpxchg_emu_u16() function that emulates two-byte
cmpxchg() in terms of four-byte cmpxchg() for architectures not having
native instructions for this purpose.  They also make use of this
cmpxchg_emu_u16() function in those architectures, namely sh, arc, csky,
and xtensa.  This permits use of two-byte cmpxchg() in common code.

However, it sadly does not permit easy implementation of all algorithms
needing on two-byte atomic operations because there are some systems still
supported by Linux that do not have native two-byte store instructions.
There is reason to believe that these systems will soon no longer be
supported by Linux.

----------------------------------------------------------------
Bradley Morgan (5):
      lib: Add two-byte cmpxchg emulation function
      sh: Emulate two-byte cmpxchg
      ARC: Emulate two-byte cmpxchg
      csky: Emulate two-byte cmpxchg
      xtensa: Emulate two-byte cmpxchg

 arch/arc/include/asm/cmpxchg.h    |  3 +++
 arch/csky/include/asm/cmpxchg.h   |  9 +++++++++
 arch/sh/include/asm/cmpxchg.h     |  2 ++
 arch/xtensa/include/asm/cmpxchg.h |  1 +
 include/linux/cmpxchg-emu.h       |  4 +++-
 lib/cmpxchg-emu.c                 | 38 ++++++++++++++++++++++++++++++++++----
 6 files changed, 52 insertions(+), 5 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-21  1:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-17  3:51 [GIT PULL] Add two-byte cmpxchg emulation function for v7.4 Paul E. McKenney
2026-10-20 18:48 ` John Paul Adrian Glaubitz
2026-10-20 18:54   ` Bradley Morgan
2026-10-20 19:21     ` Paul E. McKenney
2026-10-20 19:26       ` Bradley Morgan
2026-10-20 19:14   ` Paul E. McKenney
2026-10-21  1:08 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®