[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <cde37e36-4763-48ca-a038-4a19eb1ef914@app.fastmail.com>
Date: Tue, 23 Sep 2025 20:38:03 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Manikanta Guntupalli" <manikanta.guntupalli@....com>, git@....com,
"Michal Simek" <michal.simek@....com>,
"Alexandre Belloni" <alexandre.belloni@...tlin.com>,
"Frank Li" <Frank.Li@....com>, "Rob Herring" <robh@...nel.org>,
krzk+dt@...nel.org, "Conor Dooley" <conor+dt@...nel.org>,
Przemysław Gaj <pgaj@...ence.com>,
"Wolfram Sang" <wsa+renesas@...g-engineering.com>,
tommaso.merciai.xr@...renesas.com, quic_msavaliy@...cinc.com,
Shyam-sundar.S-k@....com, "Sakari Ailus" <sakari.ailus@...ux.intel.com>,
"'billy_tsai@...eedtech.com'" <billy_tsai@...eedtech.com>,
"Kees Cook" <kees@...nel.org>, "Gustavo A. R. Silva" <gustavoars@...nel.org>,
"Jarkko Nikula" <jarkko.nikula@...ux.intel.com>,
"Jorge Marques" <jorge.marques@...log.com>,
"linux-i3c@...ts.infradead.org" <linux-i3c@...ts.infradead.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Linux-Arch <linux-arch@...r.kernel.org>, linux-hardening@...r.kernel.org
Cc: radhey.shyam.pandey@....com, srinivas.goud@....com,
shubhrajyoti.datta@....com, manion05gk@...il.com
Subject: Re: [PATCH V7 2/4] asm-generic/io.h: Add big-endian MMIO accessors
On Tue, Sep 23, 2025, at 17:45, Manikanta Guntupalli wrote:
> Add MMIO accessors to support big-endian memory operations. These helpers
> include {read, write}{w, l, q}_be() and {read, write}s{w, l, q}_be(),
> which allows to access big-endian memory regions while returning
> the results in the CPU’s native endianness.
>
> This provides a consistent interface to interact with hardware using
> big-endian register layouts.
>
> Signed-off-by: Manikanta Guntupalli <manikanta.guntupalli@....com>
I feel like we already have too many accessor functions like these,
what's wrong with just using io{read,write}{8,16,32,64}be() in
your driver?
On most architectures (including arm, riscv, powerpc and microblaze,
but not x86), the ioread/write helpers are identical to the
readl/writel style helpers, the only difference being that on x86
they add an extra indirection for the port I/O check.
At the moment, there are only six drivers that use the
io{read,write}{8,16,32,64}be() style helpers. They
are all powerpc specific and can probably be changed
to io{read,write}be.
Arnd
Powered by blists - more mailing lists