[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DG5OGT2N6WGM.3QRRYNCHZFHHX@nvidia.com>
Date: Wed, 04 Feb 2026 07:25:08 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Gary Guo" <gary@...yguo.net>
Cc: "Danilo Krummrich" <dakr@...nel.org>, "Alice Ryhl"
<aliceryhl@...gle.com>, "Daniel Almeida" <daniel.almeida@...labora.com>,
"Miguel Ojeda" <ojeda@...nel.org>, "Boqun Feng" <boqun.feng@...il.com>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>, "Benno Lossin"
<lossin@...nel.org>, "Andreas Hindborg" <a.hindborg@...nel.org>, "Trevor
Gross" <tmgross@...ch.edu>, "Bjorn Helgaas" <bhelgaas@...gle.com>,
Krzysztof Wilczyński <kwilczynski@...nel.org>,
<driver-core@...ts.linux.dev>, <rust-for-linux@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-pci@...r.kernel.org>, "Zhi Wang"
<zhiw@...dia.com>, "Lyude Paul" <lyude@...hat.com>, "Eliot Courtney"
<ecourtney@...dia.com>
Subject: Re: [PATCH 3/6] rust: io: provide Mmio relaxed ops through a
wrapper type
On Mon Feb 2, 2026 at 11:27 PM JST, Gary Guo wrote:
> On Mon Feb 2, 2026 at 2:18 PM GMT, Danilo Krummrich wrote:
>> On Mon Feb 2, 2026 at 3:07 PM CET, Gary Guo wrote:
>>> I think ultimately choice of order to use for each I/O access is local to the
>>> specific access, not a global property.
>>>
>>> I guess one alternative design is explicit order on the access, e.g.
>>>
>>> io.read32(Relaxed)
>>>
>>> Or
>>>
>>> io.read32(Full)
>>>
>>> however this is verbose in some other ways... I'd like to hear how Boqun thinks
>>> on this one.
>>
>> This apprach would be misleading for a lot of other I/O backends. For instance,
>> the I2C bus has no relaxed ordering.
>
> This is a fair point.
>
>>>
>>> I know you can just do `RelaxedMmio::from(io).access()` for each single access
>>> too, but it feels quite verbose.
>>
>> mmio.relaxed().access() would work as well.
>
> Indeed, this looks nice.
Yup, along with the proper wrapper layout that Gary mentioned that looks
really nice and flows well within the code. I'll wait some more for more
feedback and send v2 if there are no objections about the general
direction of the patchset.
Powered by blists - more mailing lists