Re: [PATCH 3/6] rust: io: provide Mmio relaxed ops through a wrapper type

Danilo Krummrich
2026-02-02T14:18:29Z

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 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.

> 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.