public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Alexandre Courbot" <acourbot@nvidia.com>
Cc: <aliceryhl@google.com>, <daniel.almeida@collabora.com>,
	<bhelgaas@google.com>, <kwilczynski@kernel.org>,
	<ojeda@kernel.org>, <boqun.feng@gmail.com>, <gary@garyguo.net>,
	<bjorn3_gh@protonmail.com>, <lossin@kernel.org>,
	<a.hindborg@kernel.org>, <tmgross@umich.edu>, <zhiw@nvidia.com>,
	<driver-core@lists.linux.dev>, <rust-for-linux@vger.kernel.org>,
	<linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>
Subject: Re: [PATCH] rust: io: macro_export io_define_read!() and io_define_write!()
Date: Mon, 16 Feb 2026 14:47:49 +0100	[thread overview]
Message-ID: <DGGFLT2LH98S.29KNXX9XG02KQ@kernel.org> (raw)
In-Reply-To: <DGGFFDUCVJX4.57KHV1JH0LWK@nvidia.com>

On Mon Feb 16, 2026 at 2:39 PM CET, Alexandre Courbot wrote:
> On Mon Feb 16, 2026 at 10:14 PM JST, Danilo Krummrich wrote:
>> Currently, the define_read!() and define_write!() I/O macros are crate
>> public. The only user outside of the I/O module is PCI (for the
>> configurations space I/O backend). Consequently, when CONFIG_PCI=n this
>> causes a compile time warning [1].
>>
>> In order to fix this, rename the macros to io_define_read!() and
>> io_define_write!() and use #[macro_export] to export them.
>>
>> This is better than making the crate public visibility conditional, as
>> eventually subsystems will have their own crate.
>>
>> Also, I/O backends are valid to be implemented by drivers as well. For
>> instance, there are devices (such as GPUs) that run firmware which
>> allows to program other devices only accessible through the primary
>> device through indirect I/O.
>>
>> Since the macros are now public, also add the corresponding
>> documentation.
>
> The fix is relevant for stable kernels,

Not for stable, but for v7.0.

> but if we merge [1] these macros will disappear anyway, so is the extra
> documentation worth the trouble?

We are not removing it within the same release, v7.0 will remain as is, so
proper documentation doesn't hurt.

> [1] https://lore.kernel.org/all/20260206-io-v2-0-71dea20a06e6@nvidia.com/

  reply	other threads:[~2026-02-16 13:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16 13:14 [PATCH] rust: io: macro_export io_define_read!() and io_define_write!() Danilo Krummrich
2026-02-16 13:22 ` Daniel Almeida
2026-02-16 13:22 ` Alice Ryhl
2026-02-16 13:31   ` Danilo Krummrich
2026-02-23 21:27     ` Alice Ryhl
2026-02-16 13:39 ` Alexandre Courbot
2026-02-16 13:47   ` Danilo Krummrich [this message]
2026-02-23 22:09 ` Danilo Krummrich

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=DGGFLT2LH98S.29KNXX9XG02KQ@kernel.org \
    --to=dakr@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=daniel.almeida@collabora.com \
    --cc=driver-core@lists.linux.dev \
    --cc=gary@garyguo.net \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=zhiw@nvidia.com \
    /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