Generic Linux architectural discussions
 help / color / mirror / Atom feed
* [PATCH v1 0/4] rust: Add i8/i16 atomic try_cmpxchg helpers
@ 2025-12-27 11:59 FUJITA Tomonori
  2025-12-27 11:59 ` [PATCH v1 1/4] rust: helpers: " FUJITA Tomonori
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: FUJITA Tomonori @ 2025-12-27 11:59 UTC (permalink / raw)
  To: boqun.feng, ojeda
  Cc: a.hindborg, aliceryhl, bjorn3_gh, dakr, gary, lossin, tmgross,
	acourbot, rust-for-linux, linux-arch

This series adds Rust helpers for atomic try_cmpxchg on i8/i16 with
full, acquire, release, and relaxed orderings in preparation for
supporting Rust-side cmpxchg on those types.

Rust atomic cmpxchg is implemented on top of the kernel C APIs,
try_cmpxchg.

On architectures that support Rust today, the kernel already provides
try_cmpxchg implementations that work for i8/i16, using
architecture-specific instructions.

Tested on QEMU (86_64, arm64, riscv, loongarch, and armv7).

Follow-up patches will add Rust users of these helpers.

Boqun, feel free to drop the ordering-related notes from each patch.

FUJITA Tomonori (4):
  rust: helpers: Add i8/i16 atomic try_cmpxchg helpers
  rust: helpers: Add i8/i16 atomic try_cmpxchg_acquire helpers
  rust: helpers: Add i8/i16 atomic try_cmpxchg_release helpers
  rust: helpers: Add i8/i16 atomic try_cmpxchg_relaxed helpers

 rust/helpers/atomic_ext.c | 40 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)


base-commit: 30f5de001fb2ffacdb61e82c8626cae2d68b4d03
-- 
2.43.0


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

end of thread, other threads:[~2025-12-29 12:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-27 11:59 [PATCH v1 0/4] rust: Add i8/i16 atomic try_cmpxchg helpers FUJITA Tomonori
2025-12-27 11:59 ` [PATCH v1 1/4] rust: helpers: " FUJITA Tomonori
2025-12-29 12:06   ` Boqun Feng
2025-12-29 12:57     ` FUJITA Tomonori
2025-12-27 11:59 ` [PATCH v1 2/4] rust: helpers: Add i8/i16 atomic try_cmpxchg_acquire helpers FUJITA Tomonori
2025-12-27 11:59 ` [PATCH v1 3/4] rust: helpers: Add i8/i16 atomic try_cmpxchg_release helpers FUJITA Tomonori
2025-12-27 11:59 ` [PATCH v1 4/4] rust: helpers: Add i8/i16 atomic try_cmpxchg_relaxed helpers FUJITA Tomonori
2025-12-29 11:27 ` [PATCH v1 0/4] rust: Add i8/i16 atomic try_cmpxchg helpers Boqun Feng

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