[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9f27c23b-ea8b-443c-b09c-03ecaa210cd5@app.fastmail.com>
Date: Thu, 01 Feb 2024 06:46:46 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Yan Zhao" <yan.y.zhao@...el.com>
Cc: "Linus Walleij" <linus.walleij@...aro.org>, guoren <guoren@...nel.org>,
"Brian Cain" <bcain@...cinc.com>, "Jonas Bonn" <jonas@...thpole.se>,
"Stefan Kristiansson" <stefan.kristiansson@...nalahti.fi>,
"Stafford Horne" <shorne@...il.com>, Linux-Arch <linux-arch@...r.kernel.org>,
linux-kernel@...r.kernel.org,
"linux-csky@...r.kernel.org" <linux-csky@...r.kernel.org>,
linux-hexagon@...r.kernel.org,
"linux-openrisc@...r.kernel.org" <linux-openrisc@...r.kernel.org>
Subject: Re: [PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt
On Thu, Feb 1, 2024, at 01:01, Yan Zhao wrote:
> On Wed, Jan 31, 2024 at 12:48:38PM +0100, Arnd Bergmann wrote:
>> On Wed, Jan 31, 2024, at 06:51, Yan Zhao wrote:
>>
>> How exactly did you notice the function being wrong,
>> did you try to add a user somewhere, or just read through
>> the code?
> I came across them when I was debugging an unexpected kernel page fault
> on x86, and I was not sure whether page_to_virt() was compiled in
> asm-generic/page.h or linux/mm.h.
> Though finally, it turned out that the one in linux/mm.h was used, which
> yielded the right result and the unexpected kernel page fault in my case
> was not related to page_to_virt(), it did lead me to noticing that the
> pfn_to_virt() in asm-generic/page.h and other 3 archs did not look right.
>
> Yes, unlike virt_to_pfn() which still has a caller in openrisc (among
> csky, Hexagon, openrisc), pfn_to_virt() now does not have a caller in
> the 3 archs. Though both virt_to_pfn() and pfn_to_virt() are referenced
> in asm-generic/page.h, I also not sure if we need to remove the
> asm-generic/page.h which may serve as a template to future archs ?
>
> So, either way looks good to me :)
I think it's fair to assume we won't need asm-generic/page.h any
more, as we likely won't be adding new NOMMU architectures.
I can have a look myself at removing any such unused headers in
include/asm-generic/, it's probably not the only one.
Can you just send a patch to remove the unused pfn_to_virt()
functions?
Arnd
Powered by blists - more mailing lists