[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVwusgUqBuERm1=y7fwC5CERuX8VPGdaKcJiu3fM1oNuw@mail.gmail.com>
Date: Fri, 12 May 2023 11:57:07 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Vineet Gupta <vgupta@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Russell King <linux@...linux.org.uk>,
Greg Ungerer <gerg@...ux-m68k.org>,
linux-kernel@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
linux-snps-arc@...ts.infradead.org, linux-fsdevel@...r.kernel.org,
linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
linux-arm-kernel@...ts.infradead.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH 00/12] arch: Make virt_to_pfn into a static inline
Hi Linus,
On Thu, May 11, 2023 at 1:59 PM Linus Walleij <linus.walleij@...aro.org> wrote:
> This is an attempt to harden the typing on virt_to_pfn()
> and pfn_to_virt().
>
> Making virt_to_pfn() a static inline taking a strongly typed
> (const void *) makes the contract of a passing a pointer of that
> type to the function explicit and exposes any misuse of the
> macro virt_to_pfn() acting polymorphic and accepting many types
> such as (void *), (unitptr_t) or (unsigned long) as arguments
> without warnings.
>
> For symmetry, we do the same with pfn_to_virt().
>
> The problem with this inconsistent typing was pointed out by
> Russell King:
> https://lore.kernel.org/linux-arm-kernel/YoJDKJXc0MJ2QZTb@shell.armlinux.org.uk/
>
> And confirmed by Andrew Morton:
> https://lore.kernel.org/linux-mm/20220701160004.2ffff4e5ab59a55499f4c736@linux-foundation.org/
>
> So the recognition of the problem is widespread.
>
> These platforms have been chosen as initial conversion targets:
>
> - ARC
> - ARM
> - ARM64/Aarch64
> - asm-generic (including for example x86)
> - m68k
Thanks, builds fine on m68k with MMU, and boots fine on ARAnyM,
with the extra changes I replied on patch 2/12.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists