[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ab0490cc-ce86-4492-a088-fd2ae03f1475@app.fastmail.com>
Date: Wed, 09 Apr 2025 21:07:17 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Geert Uytterhoeven" <geert@...ux-m68k.org>,
"Miguel Ojeda" <miguel.ojeda.sandonis@...il.com>
Cc: "FUJITA Tomonori" <fujita.tomonori@...il.com>,
"Richard Weinberger" <richard@....at>,
"Anton Ivanov" <anton.ivanov@...bridgegreys.com>,
"Johannes Berg" <johannes@...solutions.net>, linux-um@...ts.infradead.org,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
"Logan Gunthorpe" <logang@...tatee.com>,
"Stephen Bates" <sbates@...thlin.com>, "Danilo Krummrich" <dakr@...nel.org>,
"Dinh Nguyen" <dinguyen@...nel.org>
Subject: Re: [PATCH v1] um: fix incompatible argument type in iounmap()
On Wed, Apr 9, 2025, at 19:07, Geert Uytterhoeven wrote:
>
> On Wed, 9 Apr 2025 at 16:48, Miguel Ojeda
> <miguel.ojeda.sandonis@...il.com> wrote:
>> On Wed, Apr 9, 2025 at 8:16 AM FUJITA Tomonori
>> <fujita.tomonori@...il.com> wrote:
>> >
>> > Align iounmap() signature with other architectures.
>>
>> Most indeed have `volatile`, but nios2 and m68k don't -- Cc'ing them
>> just in case.
>
> Indeed. Apparently the volatile keyword has not always been there...
> Why does iounmap() need the volatile keyword?
> Why does pci_iounmap() not have the volatile keyword?
In the old days, a lot of drivers marked MMIO pointers
as 'volatile void *' rather than 'void __iomem *', so iounmap()
and the readl() family of accessors need to be compatible
with that type to avoid a warning.
By the time we introduced pci_iomap()/pci_iounmap(), this was
no longer common, so they never needed it.
In theory we could go through all the old drivers and
also remove the 'volatile' markers from struct members that
store __iomem pointers, but there is no practical benefit to
that.
Arnd
Powered by blists - more mailing lists