public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: FUJITA Tomonori <fujita.tomonori@gmail.com>
Cc: ojeda@kernel.org, peterz@infradead.org, will@kernel.org,
	a.hindborg@kernel.org, aliceryhl@google.com,
	bjorn3_gh@protonmail.com, dakr@kernel.org, gary@garyguo.net,
	lossin@kernel.org, mark.rutland@arm.com,
	rust-for-linux@vger.kernel.org, tmgross@umich.edu
Subject: Re: [PATCH v2 0/4] rust: Add i8 and i16 atomic support
Date: Wed, 3 Dec 2025 19:40:59 -0800	[thread overview]
Message-ID: <aTECy9UTxhfz3E91@tardis.local> (raw)
In-Reply-To: <20251203.124148.1859835796360203240.fujita.tomonori@gmail.com>

On Wed, Dec 03, 2025 at 12:41:48PM +0900, FUJITA Tomonori wrote:
> On Mon, 17 Nov 2025 09:10:31 +0900
> FUJITA Tomonori <fujita.tomonori@gmail.com> wrote:
> 
> > This adds Atomic<i8> and Atomic<i16> support; including
> > load/store(Relaxed) and load(Acquire)/store(Release) operations.
> > 
> > Relaxed operations are implemented in C's READ_ONCE() and
> > WRITE_ONCE() macros.
> > 
> > load(Acquire)/store(Release) use C's smp_load_acquire() and
> > smp_store_release() macros. They internally use the appropriate
> > architecture-specific instructions.
> > 
> > v2:
> > - Implement relaxed operations by using C's READ_ONCE/WRITE_ONCE
> > - Rename smp_load_acquire() and smp_store_release() helpers
> > - Simplify the macro to generate atomic methods
> > v1: https://lore.kernel.org/rust-for-linux/20251115050305.3872412-1-fujita.tomonori@gmail.com/
> > 
> > FUJITA Tomonori (4):
> >   rust: sync: Add i8/i16 atomic_load_acquire/atomic_store_release
> >     helpers
> >   rust: helpers: Add i8/i16 relaxed atomic helpers
> >   rust: sync: atomic: Add i8/i16 load and store support
> >   rust: sync: atomic: Add store_release/load_acquire tests
> > 
> >  rust/helpers/atomic_ext.c            | 44 +++++++++++++++++++++++++
> >  rust/helpers/helpers.c               |  1 +
> >  rust/kernel/sync/atomic/internal.rs  | 48 ++++++++++++++++++++++++++++
> >  rust/kernel/sync/atomic/predefine.rs | 24 +++++++++++++-
> >  4 files changed, 116 insertions(+), 1 deletion(-)
> >  create mode 100644 rust/helpers/atomic_ext.c
> 
> Boqun, any thoughts on this?
> 

Sorry for the late response, the patchset looks good to me, I'm just
waiting for more reviews and some free time to take it.

Regards,
Boqun

> If we build Atomic<bool> on top of this patch's Atomic<u8> support, it
> seems we could replace all of the Rust native atomic types currently
> in use.
> 

  reply	other threads:[~2025-12-04  3:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17  0:10 [PATCH v2 0/4] rust: Add i8 and i16 atomic support FUJITA Tomonori
2025-11-17  0:10 ` [PATCH v2 1/4] rust: sync: Add i8/i16 atomic_load_acquire/atomic_store_release helpers FUJITA Tomonori
2025-12-08  3:01   ` Alexandre Courbot
2025-12-08 21:56     ` FUJITA Tomonori
2025-11-17  0:10 ` [PATCH v2 2/4] rust: helpers: Add i8/i16 relaxed atomic helpers FUJITA Tomonori
2025-11-17  0:10 ` [PATCH v2 3/4] rust: sync: atomic: Add i8/i16 load and store support FUJITA Tomonori
2025-12-08  3:08   ` Alexandre Courbot
2025-12-08 23:14     ` FUJITA Tomonori
2025-12-09  0:27       ` Alexandre Courbot
2025-12-09 23:31         ` FUJITA Tomonori
2025-12-10 23:16           ` Boqun Feng
2025-12-11  5:17             ` FUJITA Tomonori
2025-12-10 23:02       ` Boqun Feng
2025-12-11  4:46         ` FUJITA Tomonori
2025-11-17  0:10 ` [PATCH v2 4/4] rust: sync: atomic: Add store_release/load_acquire tests FUJITA Tomonori
2025-12-03  3:41 ` [PATCH v2 0/4] rust: Add i8 and i16 atomic support FUJITA Tomonori
2025-12-04  3:40   ` Boqun Feng [this message]
2025-12-04 13:12     ` FUJITA Tomonori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aTECy9UTxhfz3E91@tardis.local \
    --to=boqun.feng@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=dakr@kernel.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=lossin@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox