From: "Arnd Bergmann" <arnd@arndb.de>
To: "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Mateusz Jończyk" <mat.jonczyk@o2.pl>,
"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
Linux-Arch <linux-arch@vger.kernel.org>,
linux-kernel@vger.kernel.org
Cc: "Baoquan He" <bhe@redhat.com>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
regressions@lists.linux.dev
Subject: Re: [REGRESSION] mipsel: no RTC CMOS on the Malta platform in QEMU
Date: Tue, 14 Jan 2025 08:01:22 +0100 [thread overview]
Message-ID: <436dc4cb-6d99-415e-b20c-52f3221f85fc@app.fastmail.com> (raw)
In-Reply-To: <99f75c66-4c2d-45dc-a808-b5ba440c7551@app.fastmail.com>
On Tue, Jan 14, 2025, at 00:29, Jiaxun Yang wrote:
> 在2025年1月13日一月 下午10:16,Mateusz Jończyk写道:
>> The mediator seems to be that this bad commit causes
>> arch/mips/include/asm/io.h
>> to #include <asm-generic/io.h> at the end. As a side effect, this causes
>> the PCI_IOBASE macro to be defined:
>>
>> #ifndef PCI_IOBASE
>> #define PCI_IOBASE ((void __iomem *)0)
>> #endif
>>
>> That PCI_IOBASE value above is AFAIK incorrect for MIPS (it should be
>> defined to mips_io_port_base as far as I can tell), but this does not
>> matter much here.
>
> You are right, this is what should be done.
>
> A quick fix would be #undef PCI_IOBASE in arch/mips/include/asm/io.h
> just after including #include <asm-generic/io.h>, with ralink and loongson64
> as exception.
>
> In the long term, we should scrutinize platform usage of mips_io_base
> following ralink's approach.
I think we are close to the point of being able to remove the broken
default PCI_IOBASE: the NULL pointer here is almost always wrong, and
mainly existed to shut up build failures on architectures that have
no port I/O at all. I know that sparc32 and m68k have cases that
actually rely on the broken PCI_IOBASE, so those need a local workaround,
not sure if some mips platform also falls into this category, as
I have not looked here in detail.
Hopefully we can get to a point where any reference to port I/O
(inb/outb, PCI_IOPORT, mips_io_port_base, ...) is guarded by
an #ifdef CONFIG_HAS_IOPORT check, and this is set exactly on
those platforms that set mips_io_port_base to a valid address.
Arnd
next prev parent reply other threads:[~2025-01-14 7:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 22:16 [REGRESSION] mipsel: no RTC CMOS on the Malta platform in QEMU Mateusz Jończyk
2025-01-13 23:29 ` Jiaxun Yang
2025-01-14 7:01 ` Arnd Bergmann [this message]
2025-01-14 8:02 ` Geert Uytterhoeven
2025-01-14 9:59 ` Arnd Bergmann
2025-01-14 10:22 ` Jiaxun Yang
2025-01-14 16:11 ` Maciej W. Rozycki
2025-01-14 17:04 ` Arnd Bergmann
2025-01-14 19:10 ` Maciej W. Rozycki
2025-01-15 8:15 ` Arnd Bergmann
2025-01-14 17:56 ` Jiaxun Yang
2025-01-14 10:09 ` Jiaxun Yang
2025-01-14 10:30 ` Arnd Bergmann
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=436dc4cb-6d99-415e-b20c-52f3221f85fc@app.fastmail.com \
--to=arnd@arndb.de \
--cc=alexandre.belloni@bootlin.com \
--cc=bhe@redhat.com \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=mat.jonczyk@o2.pl \
--cc=regressions@lists.linux.dev \
--cc=tsbogend@alpha.franken.de \
/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