[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DDWIV5V651WF.2A0O2XQX5G01H@kernel.org>
Date: Fri, 31 Oct 2025 13:55:50 +0100
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Zhi Wang" <zhiw@...dia.com>
Cc: "Alice Ryhl" <aliceryhl@...gle.com>, <rust-for-linux@...r.kernel.org>,
<bhelgaas@...gle.com>, <kwilczynski@...nel.org>, <ojeda@...nel.org>,
<alex.gaynor@...il.com>, <boqun.feng@...il.com>, <gary@...yguo.net>,
<bjorn3_gh@...tonmail.com>, <lossin@...nel.org>, <a.hindborg@...nel.org>,
<tmgross@...ch.edu>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <cjia@...dia.com>, <smitra@...dia.com>,
<ankita@...dia.com>, <aniketa@...dia.com>, <kwankhede@...dia.com>,
<targupta@...dia.com>, <zhiwang@...nel.org>, <acourbot@...dia.com>,
<joelagnelf@...dia.com>, <jhubbard@...dia.com>, <markus.probst@...teo.de>,
"Bjorn Helgaas" <helgaas@...nel.org>
Subject: Re: [PATCH v3 1/5] rust: io: factor common I/O helpers into Io
trait
On Fri Oct 31, 2025 at 1:48 PM CET, Zhi Wang wrote:
> Yeah, I actually tried that in an earlier version.
> I noticed that each backend is a bit different — for example, the PCI
> config space routines don’t have read64()/write64() either.
We can split it up in multiple traits if necessary, e.g. have a separate trait
for 64 bit operations.
> By
> design, we don’t provide infallible versions for the PCI config space
> backend (unlike the MMIO one). Other backends might have similar cases
> as well.
That seems wrong: For the PCI configuration space we can almost always do
infallibe range checks, i.e. the normal range is always guaranteed and extended
can be asserted as described in [1].
[1] https://lore.kernel.org/lkml/DDWINZJUGVQ8.POKS7A6ZSRFK@kernel.org/
Powered by blists - more mailing lists