All of lore.kernel.org
 help / color / mirror / Atom feed
From: Link Mauve <linkmauve@linkmauve.fr>
To: Gary Guo <gary@garyguo.net>
Cc: "Link Mauve" <linkmauve@linkmauve.fr>,
	rust-for-linux@vger.kernel.org,
	"Ethan Plant" <plant.ethan@gmail.com>,
	"Michael Garofalo" <officialTechflashYT@gmail.com>,
	"Ash Logan" <ash@heyquark.com>,
	"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
	"Sasha Finkelstein" <k@chaosmail.tech>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>,
	linux-kernel@vger.kernel.org, driver-core@lists.linux.dev
Subject: Re: [PATCH v2] rust: io: Add a BigEndianMmio wrapper
Date: Thu, 6 Aug 2026 14:13:33 +0200	[thread overview]
Message-ID: <anR6bfODEukoiCv5@desktop> (raw)
In-Reply-To: <DKHU2JQ95D67.33B9B0U3539IA@garyguo.net>

On Thu, Aug 06, 2026 at 12:44:31PM +0100, Gary Guo wrote:
> On Thu Aug 6, 2026 at 7:22 AM BST, Link Mauve wrote:
> > This allows the user to read from and write to big-endian MMIO devices,
> > such as those found on PowerPC systems.
> >
> > The implementation is pretty much a copy-paste of the RelaxedMmio type,
> > with the business logic changed.
> >
> > This has been tested with various WIP drivers on the Nintendo Wii, and I
> > thought it would be nicer to upstream it before those are completely
> > ready, to get some review.
> 
> An alternative approach would be to have a generic wrapper `BigEndian<IO>` where
> it performs byte-swapping in its `IoCapable` implementation. This is more
> composable as it works for all I/O.
> 
> Of course, this means that it won't be using the specialized BE I/O impl, but
> then the only architectures that have specialized ioread16be are PPC32 and
> SPARC, so maybe it's a reasonable trade-off to make?

In the end this should all be inlined anyway, I’ll compare the generated
assembly but I expect no change here.

> 
> Best,
> Gary
[…]

-- 
Link Mauve

      reply	other threads:[~2026-08-06 12:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  6:22 [PATCH v2] rust: io: Add a BigEndianMmio wrapper Link Mauve
2026-08-06 11:44 ` Gary Guo
2026-08-06 12:13   ` Link Mauve [this message]

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=anR6bfODEukoiCv5@desktop \
    --to=linkmauve@linkmauve.fr \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=ash@heyquark.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=driver-core@lists.linux.dev \
    --cc=gary@garyguo.net \
    --cc=j.neuschaefer@gmx.net \
    --cc=k@chaosmail.tech \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=officialTechflashYT@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=plant.ethan@gmail.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.