mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Andrew Ballance" <andrewjballance@gmail.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Dave Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	bhelgaas@google.com,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Raag Jadav" <raag.jadav@intel.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	me@kloenk.dev, "FUJITA Tomonori" <fujita.tomonori@gmail.com>,
	daniel.almeida@collabora.com
Cc: "nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	rust-for-linux@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH 00/11] rust: add support for Port io
Date: Fri, 09 May 2025 07:53:31 +0200	[thread overview]
Message-ID: <ff526b49-a033-450d-9e48-699187167712@app.fastmail.com> (raw)
In-Reply-To: <20250509031524.2604087-1-andrewjballance@gmail.com>

On Fri, May 9, 2025, at 05:15, Andrew Ballance wrote:
> currently the rust `Io` type maps to the c read{b, w, l, q}/write{b, w, l, q}
> functions and have no support for port io.this is a problem for pci::Bar
> because the pointer returned by pci_iomap is expected to accessed with
> the ioread/iowrite api [0].
>
> this patch series splits the `Io` type into `Io`, `PortIo` and `MMIo`.and,
> updates pci::Bar, as suggested in the zulip[1], so that it is generic over
> Io and, a user can optionally give a compile time hint about the type of io. 

Can you describe here why you want to support both "Io" and "PortIo"
cases separately? I don't think we need to micro-optimize for
legacy ISA devices any more, so I'd hope the "Io" path would be
sufficient to cover the common outliers (ata, uart, vga, ipmi, ne2000)
that need the iomap indirection and also the legacy devices that only
need port I/O (floppy, x86 platform devices, ...).

Ideally we'd only need one set of I/O accessors at all, but I suspect
there are x86 specific drivers that actually need readl/writel to be
inline for performance when accessing on-chip registers rather than
slow PCIe registers.

      Arnd

  parent reply	other threads:[~2025-05-09  5:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09  3:15 Andrew Ballance
2025-05-09  3:15 ` [PATCH 01/11] rust: helpers: io: use macro to generate io accessor functions Andrew Ballance
2025-05-09  5:32   ` Arnd Bergmann
2025-05-13  1:59   ` kernel test robot
2025-05-09  3:15 ` [PATCH 02/11] rust: io: Replace Io with MMIo using IoAccess trait Andrew Ballance
2025-05-12 20:07   ` Bjorn Helgaas
2025-05-09  3:15 ` [PATCH 03/11] rust: io: implement Debug for IoRaw and add some doctests Andrew Ballance
2025-05-09  3:15 ` [PATCH 04/11] rust: io: add PortIo Andrew Ballance
2025-05-09  6:05   ` Arnd Bergmann
2025-05-13  6:09   ` kernel test robot
2025-05-09  3:15 ` [PATCH 05/11] rust: io: add new Io type Andrew Ballance
2025-05-09  3:15 ` [PATCH 06/11] io: move PIO_OFFSET to linux/io.h Andrew Ballance
2025-05-09  5:42   ` Arnd Bergmann
2025-05-09 11:35   ` Andy Shevchenko
2025-05-09  3:15 ` [PATCH 07/11] rust: io: add from_raw_cookie functions Andrew Ballance
2025-05-09  5:45   ` Arnd Bergmann
2025-05-09  3:15 ` [PATCH 08/11] rust: pci: make Bar generic over Io Andrew Ballance
2025-05-09  3:15 ` [PATCH 09/11] samples: rust: rust_driver_pci: update to use new bar and io api Andrew Ballance
2025-05-09  3:15 ` [PATCH 10/11] gpu: nova-core: update to use the " Andrew Ballance
2025-05-09  3:15 ` [PATCH 11/11] rust: devres: fix doctest Andrew Ballance
2025-05-09  5:53 ` Arnd Bergmann [this message]
2025-05-13 15:15   ` [PATCH 00/11] rust: add support for Port io Andrew Ballance
2025-05-13  8:32 ` 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=ff526b49-a033-450d-9e48-699187167712@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=a.hindborg@kernel.org \
    --cc=airlied@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=andrewjballance@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=benno.lossin@proton.me \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=me@kloenk.dev \
    --cc=nouveau@lists.freedesktop.org \
    --cc=ojeda@kernel.org \
    --cc=raag.jadav@intel.com \
    --cc=rafael@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --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

all inboxes | Powered by JetHome®