rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: FUJITA Tomonori <fujita.tomonori@gmail.com>
To: boqun.feng@gmail.com
Cc: fujita.tomonori@gmail.com, ojeda@kernel.org,
	alex.gaynor@gmail.com, 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 v1 1/3] rust: sync: Add smp_store_release/smp_load_acquire helpers
Date: Sat, 15 Nov 2025 22:23:24 +0900 (JST)	[thread overview]
Message-ID: <20251115.222324.673595697251044200.fujita.tomonori@gmail.com> (raw)
In-Reply-To: <aRglTQvGutpP3kE1@tardis.local>

On Fri, 14 Nov 2025 23:01:33 -0800
Boqun Feng <boqun.feng@gmail.com> wrote:

>> Do you mean that I should remove the VolatileOps trait and implement
>> AtomicBasicOps for i8/i16 using a dedicated macro like
>> impl_only_atomic_load_and_store_ops?
> 
> Right, I would want to avoid to use write_volatile() and read_volatile()
> directly as atomic operations, but rather we implement
> atomic_*_{load,store}() with WRITE_ONCE() and READ_ONCE(), and then Rust
> code call them. In this way we keep our kernel memory model bits on the
> C side.

Sounds good, will do in v2.


  reply	other threads:[~2025-11-15 13:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-15  5:03 [PATCH v1 0/3] rust: Add i8 and i16 atomic support FUJITA Tomonori
2025-11-15  5:03 ` [PATCH v1 1/3] rust: sync: Add smp_store_release/smp_load_acquire helpers FUJITA Tomonori
2025-11-15  5:22   ` Boqun Feng
2025-11-15  6:22     ` FUJITA Tomonori
2025-11-15  7:01       ` Boqun Feng
2025-11-15 13:23         ` FUJITA Tomonori [this message]
2025-11-15  5:03 ` [PATCH v1 2/3] rust: sync: atomic: Add i8 and i16 support (load and store) FUJITA Tomonori
2025-11-15  5:03 ` [PATCH v1 3/3] rust: sync: atomic: Add store_release/load_acquire tests 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=20251115.222324.673595697251044200.fujita.tomonori@gmail.com \
    --to=fujita.tomonori@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).