From: Rustam Adilov <adilov@disroot.org>
To: Thomas Gleixner <tglx@kernel.org>
Cc: Birger Koblitz <mail@birger-koblitz.de>,
Bert Vermeulen <bert@biot.com>, John Crispin <john@phrozen.org>,
linux-kernel@vger.kernel.org,
Carlo Szelinsky <github@szelinsky.de>
Subject: Re: [PATCH v2] irqchip/irq-realtek-rtl: change to __raw reads and writes
Date: Thu, 20 Aug 2026 14:56:54 +0000 [thread overview]
Message-ID: <b9957946648e61207df50e009bc49c25@disroot.org> (raw)
In-Reply-To: <87o6eyj5mr.ffs@fw13>
On 2026-08-19 19:02, Thomas Gleixner wrote:
> On Sat, Jul 25 2026 at 15:14, Rustam Adilov wrote:
>> When CONFIG_SWAP_IO_SPACE is enabled, readl() and writel() are
>> changed to perform a byte swap to little endian type. This is
>> incorrect because the devices that use the irq-realtek-rtl driver
>> are all big endian MIPS chips.
>
> That still does not make sense. With CONFIG_SWAP_IO_SPACE() enabled
> readl() performs a address swizzle to convert from BE (CPU) to LE
> (device). readl() swaps the read data from LE (device) to BE (CPU)
> and writel() the other way round.
>
> You need that change not because your CPU is big endian. You need it
> because the device is BE, so you don't want to have the LE -> BE
> conversion, right?
Right, yes. Still getting the grasp of the SWAP_IO_SPACE it seems.
> Btw, please use readl_be() and writel_be() as those are the proper
> generic interfaces for this.
>
> And please put a comment into the driver explaining that the device is
> BE.
Okay, will do that in the next version.
Best,
Rustam
prev parent reply other threads:[~2026-08-20 14:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 10:14 [PATCH v2] irqchip/irq-realtek-rtl: change to __raw reads and writes Rustam Adilov
2026-08-19 19:02 ` Thomas Gleixner
2026-08-20 14:56 ` Rustam Adilov [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=b9957946648e61207df50e009bc49c25@disroot.org \
--to=adilov@disroot.org \
--cc=bert@biot.com \
--cc=github@szelinsky.de \
--cc=john@phrozen.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@birger-koblitz.de \
--cc=tglx@kernel.org \
/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