From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: FUJITA Tomonori <fujita.tomonori@gmail.com>
Cc: jens.korinth@tuta.io, rust-for-linux@vger.kernel.org,
ojeda@kernel.org, alex.gaynor@gmail.com, boqun.feng@gmail.com,
gary@garyguo.net, bjorn3_gh@protonmail.com,
benno.lossin@proton.me, a.hindborg@kernel.org,
aliceryhl@google.com, tmgross@umich.edu
Subject: Re: [PATCH v1] rust: Add pr_*_once macros
Date: Tue, 5 Nov 2024 21:20:48 +0100 [thread overview]
Message-ID: <CANiq72m1TrB=HpxABWEvOaYwXn6yZOJFHtyYnnvDLVyCSLbOcA@mail.gmail.com> (raw)
In-Reply-To: <20241105.083343.2243442761267649401.fujita.tomonori@gmail.com>
On Tue, Nov 5, 2024 at 12:33 AM FUJITA Tomonori
<fujita.tomonori@gmail.com> wrote:
>
> I think that all the architectures that support Rust implement WARN_ONCE
> in assembly. The simple wrapper for them doesn't work.
As far as I can see, `WARN_ONCE` uses the once lite support, not the
jump label one.
Which is why I assume Jens picked that name.
But even if that wasn't true...
> I assume that we simply can't cut and past the assembly in the C side
> so it will be complicated.
...we will have (going into -next as we speak -- Steven just picked it
up) a `RSCPP` rule that we use to expand C macros that end up in an
inline assembly string and then paste into a Rust file (cutting the
part of the file that is not part of that string).
It was added for jump label for tracepoints, precisely to avoid
duplicating the inline assembly.
Cheers,
Miguel
next prev parent reply other threads:[~2024-11-05 20:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-03 3:05 [PATCH v1] rust: Add pr_*_once macros FUJITA Tomonori
2024-11-03 16:38 ` Dirk Behme
2024-11-04 1:48 ` FUJITA Tomonori
2024-11-03 16:41 ` Miguel Ojeda
2024-11-03 22:29 ` jens.korinth
2024-11-04 2:15 ` FUJITA Tomonori
2024-11-04 6:08 ` Boqun Feng
2024-11-04 2:08 ` FUJITA Tomonori
2024-11-04 15:44 ` Miguel Ojeda
2024-11-04 22:08 ` jens.korinth
2024-11-04 22:20 ` Boqun Feng
2024-11-04 23:33 ` FUJITA Tomonori
2024-11-05 20:20 ` Miguel Ojeda [this message]
2024-11-05 23:33 ` FUJITA Tomonori
2024-11-05 20:35 ` Miguel Ojeda
2024-11-05 23:31 ` 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='CANiq72m1TrB=HpxABWEvOaYwXn6yZOJFHtyYnnvDLVyCSLbOcA@mail.gmail.com' \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=jens.korinth@tuta.io \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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).